We can store up to two mappings per 1MB block, since VAs aren't necessarily aligned.
Allocations need to cover at least one block, so that we never have >2 allocations per block.
alloc/free are O(size), with one iteration per 1MB block.
We store a VA in the block metadata so that we don't have to unconditionally dereference the heaps. Doing so could create a race condition when destroying a heap, even if the VA we are dereferencing lies outside that heap.
free must be called before actually freeing the memory allocation, otherwise we could create a race with alloc.
frog.cpp.txt
Couple of notes:
alloc/freeare O(size), with one iteration per 1MB block.freemust be called before actually freeing the memory allocation, otherwise we could create a race withalloc.