NAME ^

src/memory.c - Memory allocation

DESCRIPTION ^

The memory (mem) API handles memory allocation,

Basically just a wrapper around malloc/calloc/realloc/free() with an setup function to initialize the memory pools.

Functions ^

void *mem_sys_allocate(size_t size)

Uses malloc to allocate system memory.

void *mem_sys_allocate_zeroed(size_t size)

Uses calloc to allocate system memory.

void *mem_sys_realloc(void *from, size_t size)

Resize a chunk of system memory.

void mem_sys_free(void *from)

Free a chunk of memory back to the system.

void mem_setup_allocator(Interp *interp)

Initializes the allocator.


parrot