Managing memory includes subdividing the memory into a first set of blocks
corresponding to a first size and a second set of blocks corresponding to
a second size that is greater than said first size, in response to a
request for an amount of memory that is less than or equal to the first
size, providing one of the first set of blocks, and, in response to a
request for an amount of memory that is greater than the first size and
less than or equal to the second size, providing one of the second set of
blocks. Subdividing the memory may also include subdividing the memory
into a plurality of sets of blocks, where each particular set contains
blocks corresponding to one size that is different from that of blocks
not in the particular set. Each set of blocks may correspond to a size
that is a multiple of a predetermined value. Managing memory may also
include providing a table containing an entry for each set of blocks. The
entry for each set of blocks may be a pointer to one of: an unused block
and null. Unused blocks of a set may be linked together to form a linked
list where the pointer for each entry in the table points to the first
block in the list.