Remove extra sentinel from shape capacities
This isn't a 0 terminated list anymore because we iterate over heaps_count directly. So we don't need to allocate an extra byte for the sentinel
Make it obvious that field count guard is for debug
This is because when RVALUE_OVERHEAD is positive, ie. when RACTOR_CHECK_MODE is enabled and we need to store the pointer to the owning ractor, we need to make sure there is enough space to store it....
RVALUE_OVERHEAD
RACTOR_CHECK_MODE
Replace sweeping_heaps map with a counter
We implemented some bit twiddling logic with an unsigned int to have a neat way of tracking which heaps were currently sweeping, but we actually don't need to care which heap is sweeping right now, just whether some are or not, so we can replace this with a counter.
Use the pre-processor to generate slot sizes and reciprocals
Fix zjit hir tests
Allow flex in heap growth threshold
Add a 7/8 multiplier to the min_free_slots checks in gc_sweep_finish_heap and gc_marks_finish, allowing heaps to be up to ~12.5% below the free slots target without triggering a major GC or forced growth.
With 12 heaps instead of 5, each heap independently hitting the exact...
Cache has_sweeping_pages as a bitfield
Update tests for new pool layout
Introduce RVALUE_SIZE GC constant
Add GC::INTERNAL_CONSTANTS[:RVALUE_SIZE] to store the usable size (excluding debug overhead) of the smallest pool that can hold a standard RVALUE.
Introduce power-of-two size pools
Replace the RVALUE_SLOT_SIZE-multiplier based pool sizes with explicit power-of-two (and near-power-of-two) slot sizes. On 64-bit this gives 12 heaps (32, 40, 64, 80, 96, 128, 160, 256, 512, 640, 768, 1024) instead of 5, providing finer granularity and less internal...
View all revisions | View revisions
Also available in: Atom