Only preemtively grow small obj heaps

This commit is contained in:
Justin Ethier 2017-07-28 21:33:28 -04:00
parent f8ddd4909a
commit be9d68c3f1

2
gc.c
View file

@ -1077,7 +1077,7 @@ void gc_collector_sweep()
} }
// TODO: this loop only includes smallest 2 heaps, is that sufficient?? // TODO: this loop only includes smallest 2 heaps, is that sufficient??
for (heap_type = 0; heap_type < 4; heap_type++) { for (heap_type = 0; heap_type < 2; heap_type++) {
while ( ck_pr_load_ptr(&(m->cached_heap_free_sizes[heap_type])) < while ( ck_pr_load_ptr(&(m->cached_heap_free_sizes[heap_type])) <
(ck_pr_load_ptr(&(m->cached_heap_total_sizes[heap_type])) * GC_FREE_THRESHOLD)) { (ck_pr_load_ptr(&(m->cached_heap_total_sizes[heap_type])) * GC_FREE_THRESHOLD)) {
#if GC_DEBUG_TRACE #if GC_DEBUG_TRACE