parrotcode: Handling Small Object Pools | |
Contents | C |
src/resources.c - Handling Small Object Pools
Handles the accessing of small object pools (header pools).
INTVAL contained_in_pool(Interp *interp, struct Small_Object_Pool *pool, void *ptr)
pool
contains *ptr
.int Parrot_is_const_pmc(Parrot_Interp interp, PMC *pmc)
*pmc
is a constant PMC.void more_traceable_objects(Interp *interp, struct Small_Object_Pool *pool)
static void gc_ms_add_free_object(Interp *interp, struct Small_Object_Pool *pool, void *to_add)
static void *gc_ms_get_free_object(Interp *interp, struct Small_Object_Pool *pool)
void Parrot_add_to_free_list(Interp *interp, struct Small_Object_Pool *pool, struct Small_Object_Arena *arena, UINTVAL start, UINTVAL end)
start
and end
to the free list.static void gc_ms_alloc_objects(Interp *interp, struct Small_Object_Pool *pool)
struct Small_Object_Pool *new_small_object_pool(Interp *interp, size_t object_size, size_t objects_per_alloc)
Small_Object_Pool
and returns a pointer to it.void Parrot_gc_ms_init(Interp *interp)
add_free_object_fn
,
get_free_object_fn
,
alloc_object_fn
,
and more_object_fn
.void Parrot_small_object_pool_merge(Interp *interp, struct Small_Object_Pool *dest, struct Small_Object_Pool *source)
source
into dest
.include/parrot/smallobject.h, docs/memory_internals.pod.
|