1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-09 15:10:29 +02:00

Use fragmentation_low_threshold for venerable_threshold

This way fragmentation from venerable blocks doesn't cause the collector
to keep evacuating.
This commit is contained in:
Andy Wingo 2022-08-04 11:32:06 +02:00
parent 0450a282dd
commit 67f9c89f2a

View file

@ -1968,7 +1968,7 @@ static int mark_space_init(struct mark_space *space, struct heap *heap) {
space->next_block = 0; space->next_block = 0;
space->evacuation_minimum_reserve = 0.02; space->evacuation_minimum_reserve = 0.02;
space->evacuation_reserve = space->evacuation_minimum_reserve; space->evacuation_reserve = space->evacuation_minimum_reserve;
space->venerable_threshold = 0.1; space->venerable_threshold = heap->fragmentation_low_threshold;
for (size_t slab = 0; slab < nslabs; slab++) { for (size_t slab = 0; slab < nslabs; slab++) {
for (size_t block = 0; block < NONMETA_BLOCKS_PER_SLAB; block++) { for (size_t block = 0; block < NONMETA_BLOCKS_PER_SLAB; block++) {
uintptr_t addr = (uintptr_t)slabs[slab].blocks[block].data; uintptr_t addr = (uintptr_t)slabs[slab].blocks[block].data;