mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* gc.c (after_gc_sweep): reduce full GC timing.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
675ba20cea
commit
7b5a42f0fa
2 changed files with 8 additions and 4 deletions
|
@ -1,3 +1,7 @@
|
|||
Sat May 25 17:06:25 2013 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* gc.c (after_gc_sweep): reduce full GC timing.
|
||||
|
||||
Sat May 25 11:28:49 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* variable.c (set_const_visibility): return without clearing method
|
||||
|
|
8
gc.c
8
gc.c
|
@ -2252,13 +2252,13 @@ after_gc_sweep(rb_objspace_t *objspace)
|
|||
objspace->heap.free_num, objspace->heap.free_min);
|
||||
|
||||
if (objspace->heap.free_num < objspace->heap.free_min) {
|
||||
if (objspace->rgengc.remembered_shady_object_count + objspace->rgengc.oldgen_object_count > (heaps_used * HEAP_OBJ_LIMIT) / 2) {
|
||||
set_heaps_increment(objspace);
|
||||
heaps_increment(objspace);
|
||||
|
||||
if (objspace->rgengc.remembered_shady_object_count + objspace->rgengc.oldgen_object_count > (heaps_length * HEAP_OBJ_LIMIT) / 2) {
|
||||
/* if [oldgen]+[remembered shady] > [all object count]/2, then do major GC */
|
||||
objspace->rgengc.need_major_gc = TRUE;
|
||||
}
|
||||
|
||||
set_heaps_increment(objspace);
|
||||
heaps_increment(objspace);
|
||||
}
|
||||
|
||||
inc = ATOMIC_SIZE_EXCHANGE(malloc_increase, 0);
|
||||
|
|
Loading…
Reference in a new issue