memory allocation
T. William Wells
bill at proxftl.UUCP
Sat Sep 10 23:58:38 AEST 1988
In article <1262 at micomvax.UUCP> belanger at micomvax.UUCP (Robert Belanger) writes:
: Hi everybody,
:
: We are in the process of speeding up memory allocation. Because we
: have a CPU with a linear address space, but no (easy) access to disk. We have
: four(4) megabytes of DRAM available. What we want to do is avoid any system
: in order to speed up memory allocation and also reduce the overhead associated
: with memory allocation.
One scheme comes to mind for fast memory allocation: the "buddy
system allocator". This is *extremely* fast. The drawback is
that you must allocate in blocks of certain sizes. For example,
the standard method uses blocks of size k*2**n, where k is a
constant and n is a parameter. Look in Knuth or in "Data
Structures and Algorithms", Aho, Hopcroft, and Ullman, for a
description of this and other memory allocation systems.
More information about the Comp.lang.c
mailing list