#include <MemoryPool.h>
Public Member Functions | |
MemoryPool (void *m_beg, size_t m_size) | |
void * | alloc (size_t size) |
void | dealloc (void *base, size_t size) |
Friends | |
std::ofstream & | operator<< (std::ofstream &outfile, const MemoryPool &mpool) |
Definition at line 66 of file MemoryPool.h.
combblas::MemoryPool::MemoryPool | ( | void * | m_beg, |
size_t | m_size | ||
) |
Definition at line 36 of file MemoryPool.cpp.
void * combblas::MemoryPool::alloc | ( | size_t | size | ) |
Definition at line 42 of file MemoryPool.cpp.
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.
|
friend |