memory allocation

Gary Wisniewski gary at apexepa.UUCP
Fri Sep 9 22:54:06 AEST 1988


I doesn't sound like you have any special needs which demand an unusual
allocation technique---you just need a good one.

Rather than try to invent a new algorithm, why not look in Knuth's
"Fundamental Algorithms" and "Sorting and Searching".  There are plenty
of proven techniques specifically aimed at memory management.  Chances
are, you'll find that a hybrid will work perfectly.

I often prefer simplicity in memory allocation schemes.  Usually I'll choose
a first-fit or best-fit algorithm depending upon the needs of the application.
It is usually pretty easy to get excellent performance.  However, there are
some cases where the allocation demands are severe (low memory availablity
combined with high-volume allocator usage).  In such cases, more complex
algorithms such as Knuth's "boundary tag" algorithm can be used.  I generally
find such efforts not worth it except in extreme cases.


-- 
Gary J. Wisniewski				  Apex Software Corporation
{allegra,bellcore,cadre}!pitt!darth!apexepa!gary  Phone: (412) 681-4343



More information about the Comp.lang.c mailing list