Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Once upon a time, memory allocators made sense. Parent comment
C89 did mandate this:
> If ptr is a null pointer, the realloc function behaves like the malloc function for the specified size.
C89 also mandated that realloc(ptr, 0) be equivalent to free(ptr), which was removed in C99:
> If size is zero and ptr is not a null pointer, the object it points to is freed.
There are no comments on this comment yet.
C89 did mandate this:
> If ptr is a null pointer, the realloc function behaves like the malloc function for the specified size.
C89 also mandated that realloc(ptr, 0) be equivalent to free(ptr), which was removed in C99:
> If size is zero and ptr is not a null pointer, the object it points to is freed.