next up previous contents
Next: Utility classes Up: Memory Management Previous: The Segregated Storage Allocator

Brent's Implementation of First Fit Allocation Strategy

This algorithm has an overhaead of only 4 bytes per block to record the size of the block. The time require to free or allocate the block is O(log W) where W is the maximum number of words allocated dynamicaly. According to the paper this algoritm should be faster than other simple first fit, especially for large number of small blocks. The storage area is divided into S segments numbered 0...S-1. Basically two arrays are maintained : [a] PointerArray[0 ... S-1], pointer to the first block in segment i and [b] SegmentTree[0 ..2S-1] which maintains the whole area as heap. Each block also has a control word which is a signed integer. The number gives the size of the block and the sign indicates whether the block is free or not.

The BrentMemAlloc class has the following methods:


next up previous contents
Next: Utility classes Up: Memory Management Previous: The Segregated Storage Allocator
Philip A. Wilsey
1/26/1998