mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
be5ed87c2f
commit
a86d454538
2 changed files with 12 additions and 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
|
||||
|
|
9
gc.c
9
gc.c
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue