static void destroy_large(chunk_t* chunk) { large_pagemap(chunk->m, chunk->size, NULL); if(chunk->m != NULL) pool_free_size(chunk->size, chunk->m); POOL_FREE(chunk_t, chunk); }
static void destroy_large(chunk_t* chunk, uint32_t mark) { (void)mark; large_pagemap(chunk->m, chunk->size, NULL); if(chunk->m != NULL) ponyint_pool_free_size(chunk->size, chunk->m); POOL_FREE(chunk_t, chunk); }
void* heap_alloc_large(pony_actor_t* actor, heap_t* heap, size_t size) { size = pool_adjust_size(size); chunk_t* chunk = (chunk_t*) POOL_ALLOC(chunk_t); chunk->actor = actor; chunk->size = size; chunk->m = (char*) pool_alloc_size(size); chunk->slots = 0; chunk->shallow = 0; large_pagemap(chunk->m, size, chunk); chunk->next = heap->large; heap->large = chunk; heap->used += chunk->size; return chunk->m; }