[TUHS] Did realloc ever zero the new memory?

Clem Cole clemc at ccc.com
Fri Sep 11 06:41:26 AEST 2015


On Thu, Sep 10, 2015 at 4:21 PM, Larry McVoy <lm at mcvoy.com> wrote:

> Am I the only one that remembers realloc() being buggy on some systems?
‚ÄčAmen...   it was rarely useful.   I always found realloc to one of the
part I could never trust.  I do remember  what you got back from any of the
malloc calls could vary widely.  Particularly pre-ANSI C and working on
non-UNIX systems.

Malloc in general was always a tarbaby because there were (are) so many
implementations "in the wild."   I used to advise our application people to
create something that was application specific and then call the local
malloc under the covers, but the chances that a general malloc
implementation would be optimal for your code was low.‚Äč

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20150910/25a3e14c/attachment.html>

More information about the TUHS mailing list