8 #include <vapor/MyBase.h>
43 void *
Alloc(
size_t num_blks,
bool fill =
false);
69 size_t blk_size,
size_t num_blks,
bool page_aligned =
true
81 static vector < vector <_mem_allocation_t > > _mem_regions;
82 static vector <size_t> _mem_region_sizes;
83 static vector <unsigned char *> _blks;
85 static size_t _mem_size_max_req;
86 static bool _page_aligned_req;
87 static size_t _blk_size_req;
89 static size_t _mem_size_max;
90 static bool _page_aligned;
91 static size_t _blk_size;
93 static int _ref_count;
95 static int _Reinit(
size_t n);
100 #endif // _BlkMemMgr_h_
static int RequestMemSize(size_t blk_size, size_t num_blks, bool page_aligned=true)
Set the size of the memory pool used by the memory allocator.
void * Alloc(size_t num_blks, bool fill=false)
Alloc space from memory pool.
BlkMemMgr()
Initialize a memory allocator.
void FreeMem(void *ptr)
Free memory.
static size_t GetBlkSize()
The VetsUtil BlkMemMgr class.