24_2 - Dynamic Memory Allocation 1 Outline ExplicitFreeList

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Dynamic Memory Allocation
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Outline Explicit Free List Segregated Free List Suggested reading: 10.9
Background image of page 2
3 Explicit free lists Explicit list among the free blocks using pointers within the  free blocks Use data space for link pointers Typically doubly linked Still need boundary tags for coalescing It is important to realize that links are not necessarily in the same  order as the blocks
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 Explicit free lists A B C 4 4 4 4 6 6 4 4 4 4 Forward links Back links A B C
Background image of page 4
5 Freeing with explicit free lists Where to put the newly freed block in the free list LIFO (last-in-first-out) policy insert freed block at the beginning of the free list pro: simple and constant time con: studies suggest fragmentation is worse than address ordered.
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
6 Freeing with explicit free lists Where to put the newly freed block in the free list Address-ordered policy insert freed blocks so that free list blocks are always in address order
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/19/2011 for the course CS 000 taught by Professor Jing during the Fall '10 term at Fudan University.

Page1 / 15

24_2 - Dynamic Memory Allocation 1 Outline ExplicitFreeList

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online