Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Fixing C

Name: Anonymous 2014-04-09 15:55

How to fix C?
What don't you like in C?

I do not like the many useless types while we could just define our own n-bit integer
also a a better typesystem for compile time checking would be nice
I also would like pure functions that I would be able to use outside of functions just like I do in macros

no sageposting allowed

Name: Anonymous 2014-04-11 11:17

>>35
Malloc, eh? Kid, I have a story about malloc.

I once freed a memory I didn't need. Oh, then I just realize I need some data of that memory. Now, instead of removing the freeing part of my code, I'd do something much more exciting.

I knew the malloc implementation we were using managed the memory in LIFO-manner, so basically I could get the same memory back. I just allocate more memory, with exactly the same size the freed buffer was. I'd get that data back. Ingenious!

Heh heh, that code is still in production use. In a software called OpenSSL.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List