mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-24 04:25:06 +02:00
Experimental tweaks
This commit is contained in:
parent
3369214c30
commit
7631607d87
1 changed files with 5 additions and 3 deletions
8
gc.c
8
gc.c
|
@ -963,7 +963,7 @@ int gc_grow_heap(gc_heap * h, int heap_type, size_t size, size_t chunk_size, gc_
|
||||||
h_last = h_last->next;
|
h_last = h_last->next;
|
||||||
}
|
}
|
||||||
} else if (heap_type == HEAP_SM || heap_type == HEAP_64) {
|
} else if (heap_type == HEAP_SM || heap_type == HEAP_64) {
|
||||||
new_size = gc_heap_align(4096); // Completely insane(?), match linux page size
|
new_size = gc_heap_align(64 * 4096); // Completely insane(?), match linux page size
|
||||||
} else {
|
} else {
|
||||||
// Grow heap gradually using fibonnaci sequence.
|
// Grow heap gradually using fibonnaci sequence.
|
||||||
size_t prev_size = GROW_HEAP_BY_SIZE;
|
size_t prev_size = GROW_HEAP_BY_SIZE;
|
||||||
|
@ -1375,8 +1375,10 @@ fprintf(stderr, "slow alloc of %p\n", result);
|
||||||
#endif
|
#endif
|
||||||
if (result) {
|
if (result) {
|
||||||
// Check if we need to start a major collection
|
// Check if we need to start a major collection
|
||||||
if (heap_type != HEAP_HUGE && h_passed->num_unswept_children <
|
if (heap_type != HEAP_HUGE &&
|
||||||
GC_COLLECT_UNDER_UNSWEPT_HEAP_COUNT) {
|
((try_alloc == &gc_try_alloc_fixed_size && // Fixed-size object heap
|
||||||
|
h_passed->num_unswept_children < (GC_COLLECT_UNDER_UNSWEPT_HEAP_COUNT * 128)) ||
|
||||||
|
h_passed->num_unswept_children < GC_COLLECT_UNDER_UNSWEPT_HEAP_COUNT)) {
|
||||||
gc_start_major_collection(thd);
|
gc_start_major_collection(thd);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue