News for hackers. Stuff that matters.
Re:Once upon a time, memory allocators made sense by klodolph on Monday January 18, 2016 @01:16PM (#10925869)
You certainly could wrap realloc(), but besides the bizarre/unnecessary behavior with realloc(ptr, 0), it behaves exactly as you would expect: on failure it returns NULL and doesn't touch your pointer, on success it returns the new pointer. It doesn't seem like it requires any more "energy" than using malloc() and programming in C to begin with.

There are no comments on this comment yet.