parrotcode: Dead object destruction of the various headers | |
Contents | C |
src/gc/dod.c - Dead object destruction of the various headers
This file implements dead object destruction. This is documented in PDD 9 with supplementary notes in docs/dev/dod.pod.
It's possible to turn on/off the checking of the system stack and processor registers. The actual checking is implemented in src/cpu_dep.c.
There's also a verbose mode for garbage collection.
static void mark_special
PMC_EXT
structure,
append or prepend the next_for_GC
pointer; otherwise,
do the custom mark directly.void pobject_lives
int Parrot_dod_trace_root
trace_stack
can have these values: 0 ... trace normal roots, no system areas
1 ... trace whole root set
2 ... trace system areas only
static int trace_active_PMCs
int Parrot_dod_trace_children
void Parrot_dod_trace_pmc_data
void clear_cow
void used_cow
bufstart
.void Parrot_dod_sweep
GC_IS_MALLOC
, bufstart gets freed too, if possible. Avoid buffers that are immune from collection (i.e. constant).void Parrot_dod_free_pmc
void Parrot_free_pmc_ext
void Parrot_dod_free_sysmem
void Parrot_dod_free_buffer_malloc
void Parrot_dod_free_buffer
static size_t find_common_mask
val1
and val2
.void trace_mem_block
lo_var_ptr
and hi_var_ptr
.static void clear_live_bits
void Parrot_dod_clear_live_bits
void Parrot_dod_profile_start
void Parrot_dod_profile_end
what
run when profiling is enabled. Also record start time of next part.void Parrot_dod_ms_run_init
static int sweep_cb
void Parrot_dod_ms_run
void Parrot_do_dod_run
include/parrot/dod.h, src/cpu_dep.c, docs/dev/dod.dev and docs/pdds/pdd09_gc.pod.
Initial version by Mike Lambert on 2002.05.27.
|