parrotcode: Header management functions | |
Contents | C |
src/headers.c - Header management functions
Handles getting of various headers, and pool creation.
PARROT_WARN_UNUSED_RESULT PARROT_CANNOT_RETURN_NULL static void *get_free_buffer(PARROT_INTERP, NOTNULL(Small_Object_Pool *pool))
Buffer
from pool
and returns it.
Memory is cleared.PARROT_WARN_UNUSED_RESULT PARROT_CANNOT_RETURN_NULL Small_Object_Pool *new_pmc_pool(PARROT_INTERP)
PARROT_WARN_UNUSED_RESULT PARROT_CANNOT_RETURN_NULL Small_Object_Pool *new_bufferlike_pool(PARROT_INTERP, size_t actual_buffer_size)
make_bufferlike_pool()
.PARROT_WARN_UNUSED_RESULT PARROT_CANNOT_RETURN_NULL Small_Object_Pool *new_buffer_pool(PARROT_INTERP)
PARROT_WARN_UNUSED_RESULT PARROT_CANNOT_RETURN_NULL Small_Object_Pool *new_string_pool(PARROT_INTERP, INTVAL constant)
STRINGS
and returns it.PARROT_WARN_UNUSED_RESULT PARROT_CANNOT_RETURN_NULL Small_Object_Pool *make_bufferlike_pool(PARROT_INTERP, size_t buffer_size)
PARROT_WARN_UNUSED_RESULT PARROT_CANNOT_RETURN_NULL Small_Object_Pool *get_bufferlike_pool(PARROT_INTERP, size_t buffer_size)
PARROT_WARN_UNUSED_RESULT PARROT_CANNOT_RETURN_NULL PMC *new_pmc_header(PARROT_INTERP, UINTVAL flags)
PARROT_WARN_UNUSED_RESULT PARROT_CANNOT_RETURN_NULL static PMC_EXT *new_pmc_ext(PARROT_INTERP)
PMC_EXT
and returns it.void add_pmc_ext(PARROT_INTERP, NOTNULL(PMC *pmc))
PMC_EXT
to pmc
.void add_pmc_sync(PARROT_INTERP, NOTNULL(PMC *pmc))
pmc
.PARROT_CANNOT_RETURN_NULL PARROT_WARN_UNUSED_RESULT STRING *new_string_header(PARROT_INTERP, UINTVAL flags)
STRING
header.PARROT_CANNOT_RETURN_NULL PARROT_WARN_UNUSED_RESULT Buffer *new_buffer_header(PARROT_INTERP)
Buffer
.PARROT_CANNOT_RETURN_NULL PARROT_WARN_UNUSED_RESULT void *new_bufferlike_header(PARROT_INTERP, size_t size)
PARROT_WARN_UNUSED_RESULT size_t get_max_buffer_address(PARROT_INTERP)
PARROT_WARN_UNUSED_RESULT size_t get_min_buffer_address(PARROT_INTERP)
PARROT_WARN_UNUSED_RESULT size_t get_max_pmc_address(PARROT_INTERP)
PARROT_WARN_UNUSED_RESULT size_t get_min_pmc_address(PARROT_INTERP)
PARROT_WARN_UNUSED_RESULT int is_buffer_ptr(PARROT_INTERP, NOTNULL(const void *ptr))
ptr
is actually a Buffer
.PARROT_WARN_UNUSED_RESULT int is_pmc_ptr(PARROT_INTERP, NOTNULL(const void *ptr))
ptr
is actually a PMC.void Parrot_initialize_header_pools(PARROT_INTERP)
PARROT_WARN_UNUSED_RESULT int Parrot_forall_header_pools(PARROT_INTERP, int flag, NULLOK(void *arg), NOTNULL(pool_iter_fn func))
POOL_PMC
POOL_BUFFER
POOL_CONST
POOL_ALL
Interp*, Small_Object_Pool *, int flag, void *arg)
If the function returns a non-zero value iteration will stop.static void free_pool(NOTNULL(Small_Object_Pool *pool))
static int sweep_cb_buf(PARROT_INTERP, NOTNULL(Small_Object_Pool *pool), SHIM(int flag), NOTNULL(void *arg))
static int sweep_cb_pmc(PARROT_INTERP, NOTNULL(Small_Object_Pool *pool), int flag, NOTNULL(void *arg))
void Parrot_destroy_header_pools(PARROT_INTERP)
static void fix_pmc_syncs(NOTNULL(Interp *dest_interp), NOTNULL(Small_Object_Pool *pool))
void Parrot_merge_header_pools(NOTNULL(Interp *dest_interp), NOTNULL(Interp *source_interp))
source_interp
into those of dest_interp
. (Used to deal with shared objects left after interpreter destruction.)void Parrot_initialize_header_pool_names(PARROT_INTERP)
>include/parrot/headers.h.
Initial version by Mike Lambert on 2002.05.27.
|