parrotcode: Header management functions | |
Contents | C |
src/headers.c - Header management functions
Handles getting of various headers, and pool creation.
static void *get_free_buffer(Interp *interpreter, struct Small_Object_Pool *pool)
Buffer
from pool
and returns it.
Memory is cleared.struct Small_Object_Pool *new_pmc_pool(Interp *interpreter)
struct Small_Object_Pool *new_bufferlike_pool(Interp *interpreter, size_t actual_buffer_size)
make_bufferlike_pool()
.struct Small_Object_Pool *new_buffer_pool(Interp *interpreter)
struct Small_Object_Pool *new_string_pool(Interp *interpreter, INTVAL constant)
STRINGS
and returns it.struct Small_Object_Pool *make_bufferlike_pool(Interp *interpreter, size_t buffer_size)
struct Small_Object_Pool *get_bufferlike_pool(Interp *interpreter, size_t buffer_size)
PMC *new_pmc_header(Interp *interpreter)
PMC_EXT *new_pmc_ext(Interp *interpreter)
PMC_EXT
and returns it.void add_pmc_ext(Interp *interpreter, PMC *pmc)
PMC_EXT
to pmc
.STRING *new_string_header(Interp *interpreter, UINTVAL flags)
STRING
header.Buffer *new_buffer_header(Interp *interpreter)
Buffer
.void *new_bufferlike_header(Interp *interpreter, size_t size)
size_t get_max_buffer_address(Interp *interpreter)
size_t get_min_buffer_address(Interp *interpreter)
size_t get_max_pmc_address(Interp *interpreter)
size_t get_min_pmc_address(Interp *interpreter)
int is_buffer_ptr(Interp *interpreter, void *ptr)
ptr
is actually a Buffer
.int is_pmc_ptr(Interp *interpreter, void *ptr)
ptr
is actually a PMC.void Parrot_initialize_header_pools(Interp *interpreter)
int Parrot_forall_header_pools(Interp *, int flag, void *arg, pool_iter_fn)
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.void Parrot_destroy_header_pools(Interp *interpreter)
void Parrot_initialize_header_pool_names(Interp *interpreter)
include/parrot/headers.h.
Initial version by Mike Lambert on 2002.05.27.
|