My point was that realloc() is wrong, not free(). The sorely missing allocation primitive is expand(), and we've been paying for it through the nose for decades.Andrei
What would expand's signature be? It needs the current pointer, it needs the new size. Seems that it's nothing else than a renamed realloc.
The problem is just that realloc allows null-pointer (=malloc) and 0-size (=free), thereby making malloc/free obsolete.
L.
