malloc(), virtual memory

Chris Torek chris at umcp-cs.UUCP
Thu Sep 12 01:35:03 AEST 1985


> ...  Another ``gotcha'' to beware of is that space, once allocated,
> is never broken into smaller pieces. [...] Dunno if this is fixed
> under 4.3.
>
> John P. Linderman  Space Cadet  allegra!jpl

I doubt it will be; it has not yet been done.  It might create yet
another ``gotcha'', however, as coalescing smaller blocks is fairly
tricky.

By the way, I quote from my own version of the CalTech malloc which
I use in my Emacs:

 /* If there are no blocks of the appropriate size, go get some */
 /* COULD SPLIT UP A LARGER BLOCK HERE ... ACT */
    if (nextf[nunits] == NULL)
	morecore (nunits);

I put that comment in when I rewrote most of the code; the RCS logs
say that was 84/06/29---more than a year ago.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 4251)
UUCP:	seismo!umcp-cs!chris
CSNet:	chris at umcp-cs		ARPA:	chris at maryland



More information about the Comp.lang.c mailing list