default random object?

Lionello Lunesu lio at lunesu.remove.com
Sun Feb 15 16:32:18 PST 2009


> 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.



More information about the Digitalmars-d mailing list