mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-16 17:27:33 +02:00
Added GC_COLLECT_UNDER_UNSWEPT_HEAP_COUNT
Also increased threshold from 2 to 3, to be a bit more aggresive with starting major GC's
This commit is contained in:
parent
248ea16762
commit
dc89fbbc56
2 changed files with 5 additions and 1 deletions
3
gc.c
3
gc.c
|
@ -1361,7 +1361,8 @@ fprintf(stderr, "slow alloc of %p\n", result);
|
|||
#endif
|
||||
if (result) {
|
||||
// Check if we need to start a major collection
|
||||
if (heap_type != HEAP_HUGE && gc_num_unswept_heaps(h_passed) < 2) {
|
||||
if (heap_type != HEAP_HUGE && gc_num_unswept_heaps(h_passed) <
|
||||
GC_COLLECT_UNDER_UNSWEPT_HEAP_COUNT) {
|
||||
gc_start_major_collection(thd);
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -113,6 +113,9 @@ typedef unsigned char tag_type;
|
|||
/** Start GC cycle if % heap space free below this percentage */
|
||||
#define GC_COLLECTION_THRESHOLD 0.0125 //0.05
|
||||
|
||||
/** Start GC cycle if fewer than this many heap pages are unswept */
|
||||
#define GC_COLLECT_UNDER_UNSWEPT_HEAP_COUNT 3
|
||||
|
||||
/** After major GC, grow the heap so at least this percentage is free */
|
||||
#define GC_FREE_THRESHOLD 0.40
|
||||
// END GC tuning
|
||||
|
|
Loading…
Add table
Reference in a new issue