Temporarily disable growing heap after GC

To get this working properly, would need to figure out if any sub-heaps are nearly full. Since we grow these heaps anyway as needed, this code is not strictly required. So diabling for now to get cyclone to build and run again.
This commit is contained in:
Justin Ethier 2016-04-11 21:18:34 -04:00
parent 9174e320dc
commit b18aadb229

23
gc.c
View file

@ -1202,17 +1202,18 @@ fprintf(stderr, "DEBUG - after wait_handshake async\n");
total_size = cached_heap_total_size; //gc_heap_total_size(gc_get_heap()); total_size = cached_heap_total_size; //gc_heap_total_size(gc_get_heap());
total_free = cached_heap_free_size; //gc_heap_total_free_size(gc_get_heap()); total_free = cached_heap_free_size; //gc_heap_total_free_size(gc_get_heap());
//TODO: want stats on how much of each heap page is used // TODO: disabling for now
while (total_free < (total_size * GC_FREE_THRESHOLD)) { ////TODO: want stats on how much of each heap page is used
#if GC_DEBUG_TRACE // while (total_free < (total_size * GC_FREE_THRESHOLD)) {
fprintf(stdout, "Less than %f%% of the heap is free, growing it\n", //#if GC_DEBUG_TRACE
100.0 * GC_FREE_THRESHOLD); // fprintf(stdout, "Less than %f%% of the heap is free, growing it\n",
#endif // 100.0 * GC_FREE_THRESHOLD);
TODO: how do we know which heap to grow??? //#endif
gc_grow_heap(gc_get_heap(), 0, 0); // //TODO: how do we know which heap to grow???
total_size = cached_heap_total_size; // gc_grow_heap(gc_get_heap(), 0, 0);
total_free = cached_heap_free_size; // total_size = cached_heap_total_size;
} // total_free = cached_heap_free_size;
// }
#if GC_DEBUG_TRACE #if GC_DEBUG_TRACE
fprintf(stderr, "sweep done, total_size = %zu, total_free = %zu, freed = %zu, max_freed = %zu, elapsed = %zu\n", fprintf(stderr, "sweep done, total_size = %zu, total_free = %zu, freed = %zu, max_freed = %zu, elapsed = %zu\n",
total_size, total_free, total_size, total_free,