summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-14 09:03:17 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-14 09:03:17 +0000
commitb4d9f9ca1d8218d4a35bd361c363ebdba5165db9 (patch)
tree44735754e27490c4a974db2550cf5f9ae7b951e9
parent6e2a2dd3066e5a8d7267bddfa533eab1c3747aab (diff)
* gc.c (rgengc_rememberset_mark): promote remembered object earlier.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--gc.c12
2 files changed, 9 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 0212f46..f66bbb4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Wed May 14 18:02:30 2014 Koichi Sasada <ko1@atdot.net>
+
+ * gc.c (rgengc_rememberset_mark): promote remembered object earlier.
+
Mon May 12 23:57:15 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
* configure.in (rb_cv_atan2_inf_c99): check whether runtime atan2
diff --git a/gc.c b/gc.c
index b0c3bb2..c9d4efa 100644
--- a/gc.c
+++ b/gc.c
@@ -4729,16 +4729,14 @@ rgengc_rememberset_mark(rb_objspace_t *objspace, rb_heap_t *heap)
rgengc_report(2, objspace, "rgengc_rememberset_mark: clear %p (%s)\n", p, obj_type_name((VALUE)p));
#if RGENGC_AGE2_PROMOTION
if (RVALUE_INFANT_P((VALUE)p)) {
- /* infant objects should remain in remembered because remembered objects should become old objects */
- /* young objects become old objects soon */
+ RVALUE_PROMOTE_INFANT(objspace, (VALUE)p);
+ RVALUE_PROMOTE_YOUNG(objspace, (VALUE)p);
}
- else {
- CLEAR_IN_BITMAP(bits, p);
+ else if (RVALUE_YOUNG_P((VALUE)p)) {
+ RVALUE_PROMOTE_YOUNG(objspace, (VALUE)p);
}
-#else
- CLEAR_IN_BITMAP(bits, p);
#endif
-
+ CLEAR_IN_BITMAP(bits, p);
#if RGENGC_PROFILE > 0
clear_count++;
#endif