SLIDE 2 10/21/2014 2
Allocation Strategies
– Find the first free block, starting from the beginning, that can accommodate the request
– Find the first free block, starting where the last search left off, that can accommodate the request
– Find the free block that is closest in size to the request
Allocation Strategies Continued
– Find the free block with the most left over after fulfilling the allocation request
– Keep several lists of free blocks of common sizes, allocate from the list that nearest matches the request
Bitmaps
A B C D
11111100 00111000 01111111 11111000
8 16 24 32 Memory regions Bitmap
Minimal Units of Allocation
- Break memory up into fixed sized chunks
- Easier to manage
- Need less entries in bitmap
- When memory from OS, chunk called a Page
- When chunk of disk: Block
Linked Lists
A B C D Memory regions
A 6 ‐ 6 4 B 10 3 ‐ 13 4 C 17 9 ‐ 29 3 D 26 3
8 16 24 32
Reclaiming Freed Memory
A X B A X X B X A B A B