79 assert(
store == NULL);
83 throw "malloc failed";
103 template<
typename T,
int N>
106 assert(
store == NULL);
108 size_t total = (num_ele + pre_size) *
sizeof(T);
114 template<
typename T,
int N>
116 size_t& avail_sz,
void*& avail_p)
118 assert(
store != NULL);
120 size_t total = (num_ele + pre_size) *
sizeof(T);
124 avail_p = (
ui8*)avail_p + total;
126 assert((avail_sz & 0x8000000000000000llu) == 0);
void wrap(T *buffer, size_t num_ele, ui32 pre_size)
void get_buffer(ui32 needed_bytes, coded_lists *&p)
mem_elastic_allocator(ui32 chunk_size)
void pre_alloc_data(size_t num_ele, ui32 pre_size)
void pre_alloc_obj(size_t num_ele)
void pre_alloc_local(size_t num_ele, ui32 pre_size, size_t &sz)
T * post_alloc_data(size_t num_ele, ui32 pre_size)
T * post_alloc_obj(size_t num_ele)
T * post_alloc_local(size_t num_ele, ui32 pre_size, size_t &avail_sz, void *&avail_p)
size_t calc_aligned_size(size_t size)
static ui32 eval_store_bytes(ui32 available_bytes)
stores_list(ui32 available_bytes)