mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* gc.c (garbage_collect_body): lazy_sweep setting should work
without USE_RGENGC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a0a1d0f268
commit
d767adf990
2 changed files with 10 additions and 7 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Thu Dec 19 00:26:11 2013 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
|
* gc.c (garbage_collect_body): lazy_sweep setting should work
|
||||||
|
without USE_RGENGC.
|
||||||
|
|
||||||
Wed Dec 18 23:31:04 2013 Koichi Sasada <ko1@atdot.net>
|
Wed Dec 18 23:31:04 2013 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
* gc.c (gc_profile_dump_major_reason): fix this function because major_reason
|
* gc.c (gc_profile_dump_major_reason): fix this function because major_reason
|
||||||
|
|
12
gc.c
12
gc.c
|
@ -4966,9 +4966,11 @@ garbage_collect_body(rb_objspace_t *objspace, int full_mark, int immediate_sweep
|
||||||
reason |= GPR_FLAG_MAJOR_BY_STRESS;
|
reason |= GPR_FLAG_MAJOR_BY_STRESS;
|
||||||
immediate_sweep = !(flag & 0x02);
|
immediate_sweep = !(flag & 0x02);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if USE_RGENGC
|
|
||||||
else {
|
else {
|
||||||
|
if (!GC_ENABLE_LAZY_SWEEP || objspace->flags.dont_lazy_sweep) {
|
||||||
|
immediate_sweep = TRUE;
|
||||||
|
}
|
||||||
|
#if USE_RGENGC
|
||||||
if (full_mark) {
|
if (full_mark) {
|
||||||
reason |= GPR_FLAG_MAJOR_BY_NOFREE;
|
reason |= GPR_FLAG_MAJOR_BY_NOFREE;
|
||||||
}
|
}
|
||||||
|
@ -4982,12 +4984,8 @@ garbage_collect_body(rb_objspace_t *objspace, int full_mark, int immediate_sweep
|
||||||
if (objspace->rgengc.old_object_count > objspace->rgengc.old_object_limit) {
|
if (objspace->rgengc.old_object_count > objspace->rgengc.old_object_limit) {
|
||||||
reason |= GPR_FLAG_MAJOR_BY_OLDGEN;
|
reason |= GPR_FLAG_MAJOR_BY_OLDGEN;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!GC_ENABLE_LAZY_SWEEP || objspace->flags.dont_lazy_sweep) {
|
|
||||||
immediate_sweep = TRUE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
if (immediate_sweep) reason |= GPR_FLAG_IMMEDIATE_SWEEP;
|
if (immediate_sweep) reason |= GPR_FLAG_IMMEDIATE_SWEEP;
|
||||||
full_mark = (reason & GPR_FLAG_MAJOR_MASK) ? TRUE : FALSE;
|
full_mark = (reason & GPR_FLAG_MAJOR_MASK) ? TRUE : FALSE;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue