New methods for dynamic storage allocation (Fast Fits)

  • Authors:
  • C. J. Stephenson

  • Affiliations:
  • Thomas J. Watson Research Center, Yorktown Heights, NY

  • Venue:
  • SOSP '83 Proceedings of the ninth ACM symposium on Operating systems principles
  • Year:
  • 1983

Quantified Score

Hi-index 0.00

Visualization

Abstract

The classical methods for implementing dynamic storage allocation can be summarized thus First Fit and Best Fit The available blocks of storage are linked together in address order. Storage is allocated from the first available block of sufficient length, or from a block with the minimum excess length. Storage can be allocated or released in multiples of two words. In the long run, if numerous pieces of storage of more-or-less random lengths are allocated and released at more-or-less random intervals, the storage becomes fragmented, and a number of uselessly small blocks develop, particularly near the beginning of the list. Although these fragments usually comprise a small proportion of the storage (typically around 10 per cent), a lot of time can be wasted chaining through them. Buddy Methods Here the task of managing the storage is reduced in size by constraining the way in which the storage can be divided up, e.g. into blocks with lengths which are powers of 2. This eliminates chaining through long lists of uselessly small blocks; on the other hand, space is wasted in rounding up the length requested to an allowable size, and typically about 40 per cent more storage is required to satisfy the same allocations than when using First Fit or Best Fit. The methods presented in this paper are externally compatible with First Fit and Best Fit, and require roughly the same amount of storage for a given sequence of allocations. They use, however, a completely different internal data structure, one effect of which is to reduce the number of blocks that have to be visited to perform a typical allocation or release operation. These new methods exhibit roughly the same space performance as First Fit, and a time performance which falls between those of First Fit and Buddy.