diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | gc.c | 9 |
2 files changed, 12 insertions, 3 deletions
@@ -1,3 +1,9 @@ +Fri May 16 17:38:22 2014 Koichi Sasada <ko1@atdot.net> + + * gc.c (gc_marks, gc_marks_body): increase the counter of young objects + at the major GC because AGE2Promotion changes all old objects into + young objects at major GC. + Fri May 16 17:26:24 2014 Koichi Sasada <ko1@atdot.net> * gc.c (gc_before_sweep): heap_pages_swept_slots should contains @@ -4210,6 +4210,12 @@ gc_marks_body(rb_objspace_t *objspace, int full_mark) } else { objspace->profile.major_gc_count++; +#if RGENGC_AGE2_PROMOTION + /* all old objects change to young objects */ + objspace->rgengc.young_object_count += objspace->rgengc.old_object_count; +#endif + objspace->rgengc.remembered_shady_object_count = 0; + objspace->rgengc.old_object_count = 0; rgengc_mark_and_rememberset_clear(objspace, heap_eden); } #endif @@ -4570,9 +4576,6 @@ gc_marks(rb_objspace_t *objspace, int full_mark) gc_verify_internal_consistency(Qnil); #endif if (full_mark == TRUE) { /* major/full GC */ - objspace->rgengc.remembered_shady_object_count = 0; - objspace->rgengc.old_object_count = 0; - gc_marks_body(objspace, TRUE); { /* See the comment about RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR */ |