Malloc problems
Doug Gwyn
gwyn at brl-smoke.ARPA
Mon May 16 05:32:46 AEST 1988
In article <690008 at hpfelg.HP.COM> jk at hpfelg.HP.COM (John Kessenich) writes:
> 2. Free does not necessarily return memory for malloc's
> immediate re-use.
In any reasonable implementation, it does.
The only wrinkle is that some implementations promise that an
immediately-following realloc() on the freed block will work, but
the freed block IS available immediately for re-use; this is just
a special weird case of re-use. A malloc() after a free() is
expected to be able to return a pointer to a block containing
some or all of the freed block.
More information about the Comp.lang.c
mailing list