Y
Hacker News
new
|
ask
|
show
|
jobs
by
JoshTriplett
1172 days ago
realloc to 0 size being free is useful in particular because it means a function pointer to realloc is a complete memory allocator: call realloc with pointer NULL to get malloc, and call realloc with size 0 to get free.