void heap_addBitpool( heapAllocator* h, size_t size, size_t count ) { size_t arena_size = size * count; void* arena = heap_allocate( h, arena_size, NULL ); h->bitpools[h->bitpool_count++] = bitpool_create( size, count, arena ); }
void* mem_alloc_( size_t bytes, const char* func, const char* file, int line ) { char buffer[MemSourceLength]; snprintf( buffer, MemSourceLength, "%s(%s:%d)", func, file, line ); buffer[MemSourceLength - 1] = '\0'; return heap_allocate( static_heap, bytes, buffer ); }
void* mem_alloc( size_t bytes ) { return heap_allocate( static_heap, bytes, NULL ); }
void *heap_alloc_uncollectable(u4 size) { return heap_allocate(size, false, NULL); }