Unformatted text preview: hrough the heap, potentially many more cache misses.
• Both are O(N), but N is not same. FindMaster is bounded by the count of in-use
masters which is guaranteed fewer than or equal to the count of heap blocks and
likely to be many fewer.
• An explicit free list would make FindMaster O(1) and only reduce FindBlock to
O(K) where K is number of free blocks.
• The work per iteration in FindMaster is simple (cmp to NULL, increment index).
Slightly more involved for F indBlock (cmp > size, advance by size), so more
headroom for improvement.
• After compacting heap, all inuse bl...
View Full Document
- Winter '08
- CPU cache, const void *a, const void *b, void *ra