parrotcode: Handling Small Object Pools | |
Contents | C |
src/gc/resources.c - Handling Small Object Pools
Handles the accessing of small object pools (header pools).
INTVAL contained_in_pool
*ptr
points to a location in pool
.int Parrot_is_const_pmc
*pmc
is a constant PMC.
The given pointer is a constant PMC if it points into the constant PMC pool.static void more_traceable_objects
static void gc_ms_add_free_pmc_ext
static void gc_ms_add_free_object
static void *gc_ms_get_free_object
gc_ms_add_free_object
to either free them up with a DOD run,
or allocate new objects.
If there are objects available on the free list,
pop it off and return it.static void *gc_ms_get_free_pmc_ext
void Parrot_add_to_free_list
arena
to the free list.void Parrot_append_arena_in_pool
static void gc_ms_alloc_objects
Small_Object_Pool *new_small_object_pool
Small_Object_Pool
and returns a pointer to it.
Initializes the pool structure based on the size of objects in the pool and the number of items to allocate in each arena.void gc_pmc_ext_pool_init
static void gc_ms_pool_init
void Parrot_gc_ms_init
add_free_object_fn
,
get_free_object_fn
,
alloc_object_fn
,
and more_object_fn
.void Parrot_small_object_pool_merge
source
into pool dest
.
Combines the free lists directly,
moves all arenas to the new pool,
and remove the old pool.
To merge,
the two pools must have the same object size,
and the same name (if they have names).include/parrot/smallobject.h, docs/memory_internals.pod.
|