memory allocation (djg4)

David Garfield uunet.UU.NET!davgar!david
Mon, 08 Mar 1993 01:53:21 EST


I firmly believe that at the kernel level, a malloc() style memory
allocation interface should not exist.  Using malloc() does not allow
any chance for the application to control where the memory blocks are
placed.

An alternative is for the memory allocation requests to be done by
specifying the memory block and whether it is to be virtual memory,
invalid memory, or any of a variety of other choices.  Along with
this, there needs to be a request to inquire what the status of an
area of memory is.  Another useful request is to locate an area of
invalid memory (kernel support only needed for speed).  This sort of
scheme does allow a malloc() style interface on top of it (in a
library?), and also allows exact placement of memory.

I will point out that the call to determine the status of a memory
area is ABSOLUTELY NECESSARY no matter what allocation scheme is used.

I will admit to one advantage to the malloc() style interface, and
that is the (memory manager only) ability to relocate the virtual
memory provided by realloc().  I will admit I would like to see this
ability kept, even if it does mean another kernel call.
-- 
David Garfield/2250 Clarendon Blvd/Arlington, VA 22201   (703)522-9416
Email: david%davgar@uunet.uu.net or garfield@snoopy.sra.com