- Invariant
- Available memory addresses will be sorted w.r.t. their starting positions
-
At least one element exists in the freelist at any time.
-
Defragment on the fly: at any time, NO two consecutive chunks with chunk1.endaddr equals chunk2.begaddr exist
Definition at line 66 of file MemoryPool.h.
void combblas::MemoryPool::dealloc |
( |
void * |
base, |
|
|
size_t |
size |
|
) |
| |
defragment on the fly by attaching to the previous chunk if prevchunk.endaddr equals newitem.beginaddr, or by attaching to the next available chunk if newitem.endaddr equals nextchunk.begaddr
check the next chunk to see if we perfectly fill the hole
Insert x before pos: 'iterator insert(iterator pos, const T& x)'
Definition at line 60 of file MemoryPool.cpp.