Пример #1
0
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 );
}
Пример #2
0
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 );
}
Пример #3
0
void* mem_alloc( size_t bytes ) {
	return heap_allocate( static_heap, bytes, NULL );
}
Пример #4
0
void *heap_alloc_uncollectable(u4 size)
{
	return heap_allocate(size, false, NULL);
}