src/gc/resources.c - Handling Small Object Pools


Handles the accessing of small object pools (header pools).

Functions ^

INTVAL contained_in_pool

Returns whether pool contains *ptr.

int Parrot_is_const_pmc

Returns whether *pmc is a constant PMC.

static void more_traceable_objects

We're out of traceable objects. Try a DOD, then get some more if needed.

static void gc_ms_add_free_object

Add an unused object back to the free pool for later reuse.

static PObj *gc_ms_get_free_object

Get a new object from the free pool and return it.

void Parrot_add_to_free_list

Adds the objects in the newly allocated arena to the free list.

void Parrot_append_arena_in_pool

insert the new arena into the pool's structure, update stats

static void gc_ms_alloc_objects

We have no more headers on the free header pool. Go allocate more and put them on.

Small_Object_Pool *new_small_object_pool

Creates a new Small_Object_Pool and returns a pointer to it.

void gc_pmc_ext_pool_init

RT#48260: Not yet documented!!!

static void gc_ms_pool_init

RT#48260: Not yet documented!!!

void Parrot_gc_ms_init

Initialize the state structures of the gc system. Called immediately before creation of memory pools. This function must set the function pointers for add_free_object_fn, get_free_object_fn, alloc_object_fn, and more_object_fn.

void Parrot_small_object_pool_merge

Merge source into dest.


include/parrot/smallobject.h, docs/memory_internals.pod.