H09 Practice Soln

Both are on but n is not same findmaster is bounded by

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: 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

{[ snackBarMessage ]}

Ask a homework question - tutors are online