55 return _aligned_malloc(
size, alignment);
60 return _aligned_free(pointer);
65 return aligned_alloc(alignment,
size);
112 throw "malloc failed";
143 template<
typename T,
int N>
148 size_t total = (num_ele + pre_size) *
sizeof(T);
154 template<
typename T,
int N>
156 size_t& avail_sz,
void*& avail_p)
160 size_t total = (num_ele + pre_size) *
sizeof(T);
164 avail_p = (
ui8*)avail_p + total;
166 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)
stores_list * allocate(stores_list **list, ui32 extended_bytes)
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)
void * ojph_aligned_malloc(size_t alignment, size_t size)
size_t calc_aligned_size(size_t size)
void ojph_aligned_free(void *pointer)
static ui32 eval_store_bytes(ui32 available_bytes)
stores_list(ui32 available_bytes)