101110 introducing memory leaks memory leaks are slow

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: blocks must be large enough to contain all of the necessary pointers, as well as the header and possibly a footer. This results in a larger minimum block size, and potentially the degree of internal fragmentation. 10.9.14 Segregated Free Lists As we have seen, an allocator that uses a single linked list of free blocks requires time linear in the number of free blocks to allocate a block. A popular approach for reducing the allocation time, known generally as segregated storage, is to maintain multiple free lists, where each list holds blocks that are roughly the same size. The general idea is to partition the set of all possible block sizes into equivalence classes called size classes. There are many ways to define the size classes. For example, we might partition the block sizes by powers of two: 1 , 2 , 3, 4 , 5 – 8 , ¡ ¡ ¡, 1025 – 2048 , 2049 – 4096 , 4097 – ½ Or we might assign small blocks to their own size classes and partition large blocks by powers of two: 1 , 2 , 3 , ¡ ¡ ¡, 1023 , 1024 ,...
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.

Ask a homework question - tutors are online