4.2 malloc() on Suns?
Dave Yost
day at kovacs.UUCP
Sun Sep 15 11:04:46 AEST 1985
Keywords:
In article <514 at im4u.UUCP> riddle at im4u.UUCP (Prentiss Riddle) writes:
>In article <5079 at allegra.UUCP> jpl at allegra.UUCP (John P. Linderman) writes:
>>
>> ...Another ``gotcha'' [in 4.2bsd malloc()]
>>to beware of is that space, once allocated, is never broken
>>into smaller pieces. For example, if I allocate a 4 meg
>>temporary workspace, free it, then allocate a 2 meg area,
>>malloc will not reuse the freed space, it will try for a new
>>area, and, thanks to the aforementioned quirks, it will fail
>>with the standard 6 meg per-process limit. Dunno if this is
>>fixed under 4.3.
>
>Does anyone know if this has been fixed in the Sun version of malloc()?
I have a souped-up version of malloc derived from the 4.2 malloc
that reuses all available freed space before asking the system for
more. Plus it does other neat things. I was thinking of posting
it to net.sources sometime soon.
--dave yost
More information about the Comp.lang.c
mailing list