wisconsin
W06

W06

Content locked

The catalog is public. Reading this content requires approved access.

Sign in to read
Week 06 Objectives
This Week
Project P3 Progress Dates
Free Block - Too Large/Too Small
What happens if the free block chosen is bigger than the request?
Run 4: Heap First-Fit Allocation with Splitting
What happens if there is not a large enough free block to satisfy the request?
Coalescing Free Blocks
Run 5: Heap Freeing without Coalescing
Run 6: Heap Freeing with Immediate Coalescing
Free Block Footers
Layout 2: Heap Block with Headers & Free Block Footers
Run 7: Heap Freeing with Immediate Coalescing using p-bits and Footers
Explicit Free List
Free List as a Doubly-Linked List of Nodes
Explicit Free List Improvements
Free List Ordering
Free List Segregation
Heap Caveats
Consecutive heap allocations do not result in contiguous payloads!
Do not assume heap memory is initialized to 0!
Do free all heap memory that your program allocates!
Do not free heap memory more than once!
Do not read/write data in freed heap blocks!
Do not change heap memory outside of your payload!
Do check if your memory intensive program has run out of heap memory!
Memory Hierarchy
Cache
Memory Units
Memory Transfer Time