Dynamic Memory Allocation in a Simulation Environment

By Norman R. Nielsen
1973| Working Paper No. 181

This paper investigates the performance of dynamic memory allocation and deallocation algorithms when used to manage memory for simulation programs. A total of 35 different algorithms were programmed for test. A set of 18 different test demand loads were also generated to reflect the memory requests of a wide variety of simulation programs. All 35 algorithms were tested against a base demand load, and seven of the more interesting algorithms were then tested against the other 17 demand loads. Algorithm performance was measured in terms of processing time, memory usage, and a very crude measure of external memory fragmentation. Tables summarizing the performances of the algorithms on the various demand loads are presented. The algorithms which maintained a separate free list for each size memory block used tended to perform quite well relative to the other algorithms tested. Very simple algorithms which operated on a memory ordered list (without even the benefit of a free space list) performed surprisingly well. Algorithms based upon a repetitive binary splitting of memory blocks had favorable processing requirements but generally unfavorable memory usage. The algorithms which employed LIFO, FIFO, or memory ordered free space lists generally did not perform as well as the above algorithms. However, there were particular demand loads having certain characteristics which would permit one algorithm or another to excel.