This preview shows page 1. Sign up to view the full content.
Unformatted text preview: ¡ ¡ ¡, 1025 – 2048 , 2049 – 4096 , 4097 – ½ The allocator maintains an array of free lists, with one free list per size class, ordered by increasing size. When the allocator needs a block of size Ò, it searches the appropriate free list. If it cannot ﬁnd a block that ﬁts, it searches the next list, and so on. The dynamic storage allocation literature describes dozens of variants of segregated storage that differ in how they deﬁne size classes, when they perform coalescing, when they request additional heap memory from the operating system, whether they allow splitting, and so forth. To give you a sense of what is possible, we will describe two of the basic approaches: simple segregated storage and segregated ﬁts. 10.9. DYNAMIC MEMORY ALLOCATION 545 Simple Segregated Storage
With simple segregated storage, the free list for each size class contains same-sized blocks, each the size of the largest element of the size class. For example, if some size class is deﬁned as 17 – 32 , then the free...
View Full Document
This note was uploaded on 09/02/2010 for the course ELECTRICAL 360 taught by Professor Schultz during the Spring '10 term at BYU.
- Spring '10
- The American