effect of free()

T. William Wells bill at twwells.com
Sat Sep 9 17:43:11 AEST 1989


In article <10817 at riks.csl.sony.co.jp> diamond at riks. (Norman Diamond) writes:
: Well, because a freed pointer is still valid in a call to realloc
: (as long as there are no intervening *alloc calls), and the data still
: have to be sitting in limbo, not really quite freed yet.  (Much to the
: chagrin of efficiency experts everywhere.)

In the latest versions of Unix, realloc is not guaranteed to work on a
freed pointer.

Moreover, my SysV has a version of malloc that *does* trash the
memory on free.

---
Bill                    { uunet | novavax | ankh | sunvice } !twwells!bill
bill at twwells.com



More information about the Comp.lang.c mailing list