This preview shows page 1. Sign up to view the full content.
Unformatted text preview: locks. External fragmentation is much more difﬁcult to quantify than internal fragmentation because it depends not only on the pattern of previous requests and the allocator implementation, but also on the pattern of future requests. For example, suppose that after requests, all of the free blocks are exactly four words in size. Does this heap suffer from external fragmentation? The answer depends on the pattern of future requests. If all of the future allocate requests are for blocks that are smaller than four words, then there is no external fragmentation. On the other hand, if one or more requests ask for blocks larger than four words, then the heap does suffer from external fragmentation. 10.9. DYNAMIC MEMORY ALLOCATION 529 Since external fragmentation is difﬁcult to quantify and impossible to predict, allocators typically employ heuristics that attempt to maintain small numbers of larger free blocks rather than large numbers of smaller free blocks. 10.9.5 Implementation Issues
The simplest imaginable allocator would organiz...
View Full Document
- Spring '10
- The American