Info needed: UNIX for 286/386 machines (really malloc)

David F. Carlson dave at micropen
Wed Mar 16 01:24:17 AEST 1988


In article <777 at nuchat.UUCP>, steve at nuchat.UUCP (Steve Nuchia) writes:
> Re: flamage about the 286 malloc.
> 
> It really is a crock.  I looked into it and wrote the following
> allocator in support of pathalias, and it works with good
> efficiency (both space and time).
> 
> If someone wants to layer the free() logic, say from K&R,
> on top of this it would make a very usable replacement.
> 

Malloc itself is easy as the code Steve has written illustrates.
Note this implementation is fixed in the maximum allocated space.
Also free is not so easy as he would have us believe:  free must
allow future mallocs to look at all the freed space for allocation
of potentially large spaces.  If this infomation is stored in the
local segment, how many objects can be allocated in toto?  If this
information is stored globally, then a very hard limit of total objects
storable is made.  I have never had any trouble with Microports malloc,
but rather malloc-free-malloc combinations which cause unbounded process
growth.  This problem is not without solution but any varients I've 
thought of imply expensive tradeoffs in time/space for the generic
malloc I've come to know and love on linear addressing machines.



-- 
David F. Carlson, Micropen, Inc.
...!{ames|harvard|rutgers|topaz|...}!rochester!ur-valhalla!micropen!dave

"The faster I go, the behinder I get." --Lewis Carroll



More information about the Comp.unix.microport mailing list