A method, apparatus, and article of manufacture provide the ability to
efficiently and effectively manage memory. A file is broken into multiple
memory blocks that are managed as nodes in a heap tree. A request to
access memory at a linear file address is received. The linear file
address is then translated to the appropriate heap block reference to
complete the memory access. Additionally, a tri-linked list/tree of
deallocated memory units available for use by the heap may be used. A
first link points to units smaller than a current block size, a second
link points to units equal to the current block size, and a third link
points to units larger than the current block size. When a request for
memory is received, the tree is traversed to find a unit that satisfies
the request and the appropriate unit in the free list is allocated.