Andy Wingo
8409383ee1
Refactor post-collection for mark space
2022-07-20 14:40:47 +02:00
Andy Wingo
69caead182
Add heuristics to choose when to compact or mark in place
...
We can choose to compact (evacuate) or mark in place. What we choose
has some effects on how we mark.
2022-07-20 14:40:47 +02:00
Andy Wingo
09d2df1626
Compute GC yield as fraction of total heap size
2022-07-20 14:40:47 +02:00
Andy Wingo
c998f1cd5c
Measure fragmentation as fraction of total heap size
...
This allows a relatively more fragmented mark space if the majority of
the heap is taken up by lospace.
2022-07-20 14:40:47 +02:00
Andy Wingo
7af8bb6bd0
Add machinery to disable ragged-stop marking
...
We'll need to disable the optimization that mutators mark their own
stacks once we support evacuation.
2022-07-20 14:40:47 +02:00
Andy Wingo
52166fe286
Add gc_edge data structure
...
Less casting in user programs, and it's a step on the way to evacuation
in whippet.
2022-07-20 14:40:47 +02:00
Andy Wingo
808d365f4b
We identify empty blocks lazily now
2022-07-20 14:40:47 +02:00
Andy Wingo
bc73c5ad02
Whitespace fix
2022-07-20 14:40:47 +02:00
Andy Wingo
157d40466b
mark_space_reacquire_memory updates pending_unavailable_bytes
2022-07-20 14:40:47 +02:00
Andy Wingo
33a3af2c73
Large object space properly acquires blocks from mark space
...
If the mutator finds completely empty blocks, it puts them on the side.
The large object space acquires empty blocks, sweeping if needed, and
causes them to be unmapped, possibly causing GC.
2022-07-20 14:40:47 +02:00
Andy Wingo
71b656bca4
When sweeping, return empty blocks to global freelist
...
This will facilitate management of overhead for defragmentation as well
as blocks to unmap, for compensating large object allocations.
2022-07-20 14:40:47 +02:00
Andy Wingo
8f06b914b0
Refactor to allow "next" pointer embedded in block summary
2022-07-20 14:40:47 +02:00
Andy Wingo
7d80d45c79
Rename mark-sweep.h to whippet.h
2022-07-20 14:40:44 +02:00