NAME ^

src/gc/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

Uses malloc to allocate system memory.

void *mem__internal_allocate

RT#48260: Not yet documented!!!

void *mem_sys_allocate_zeroed

Uses calloc to allocate system memory. Guaranteed to succeed.

void *mem__internal_allocate_zeroed

RT#48260: Not yet documented!!!

void *mem_sys_realloc

Resize a chunk of system memory. Unlike realloc(), it can handle a NULL pointer, in which case you get a malloc back.

void *mem_sys_realloc_zeroed

Resize a chunk of system memory. Fill the newly allocated space with zeroes.

void *mem__internal_realloc

RT#48260: Not yet documented!!!

void mem_sys_free

Free a chunk of memory back to the system.

void mem__internal_free

RT#48260: Not yet documented!!!

void mem_setup_allocator

Initializes the allocator.


parrot