mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-08 21:20:19 +02:00
Instead of partitioning blocks by flag, put them in separate lists
This way you can directly iterate blocks of a certain kind. Also verify these lists more thoroughly, and allow full blocks that are the results of evacuation to skip being swept the next round. Also! Have next_hole_in_block / next_hole_in_block ensure that the object data and the mark bytes are clear.
This commit is contained in:
parent
b663e5878e
commit
d137e1397c
2 changed files with 310 additions and 253 deletions
|
@ -1024,7 +1024,7 @@ collect(struct gc_mutator *mut, enum gc_collection_kind requested_kind) {
|
|||
determine_collection_kind(heap, requested_kind);
|
||||
int is_minor = gc_kind == GC_COLLECTION_MINOR;
|
||||
HEAP_EVENT(heap, prepare_gc, gc_kind);
|
||||
nofl_space_update_mark_patterns(nofl_space, !is_minor);
|
||||
nofl_space_prepare_gc(nofl_space, gc_kind);
|
||||
large_object_space_start_gc(lospace, is_minor);
|
||||
gc_extern_space_start_gc(exspace, is_minor);
|
||||
resolve_ephemerons_lazily(heap);
|
||||
|
@ -1042,8 +1042,7 @@ collect(struct gc_mutator *mut, enum gc_collection_kind requested_kind) {
|
|||
DEBUG("last gc yield: %f; fragmentation: %f\n", yield, fragmentation);
|
||||
detect_out_of_memory(heap);
|
||||
trace_pinned_roots_after_stop(heap);
|
||||
if (gc_kind == GC_COLLECTION_COMPACTING)
|
||||
nofl_space_prepare_evacuation(nofl_space);
|
||||
nofl_space_start_gc(nofl_space, gc_kind);
|
||||
trace_roots_after_stop(heap);
|
||||
HEAP_EVENT(heap, roots_traced);
|
||||
gc_tracer_trace(&heap->tracer);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue