aboutsummaryrefslogtreecommitdiffstats
path: root/gc.c
diff options
context:
space:
mode:
authornari <nari@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-24 04:53:44 +0000
committernari <nari@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-03-24 04:53:44 +0000
commite54daddac4e5583e62ef9d665d4f3d4a859478c9 (patch)
treec9f595e24129152725d7544aed98e12a178b9baa /gc.c
parent3ad60679e37ac36b2d76b12f31036864733bb59f (diff)
downloadruby-e54daddac4e5583e62ef9d665d4f3d4a859478c9.tar.gz
* gc.c (GC_ENABLE_LAZY_SWEEP): new macro to switch lazy sweeping
for debugging. [Feature #8024] [ruby-dev:47135] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gc.c b/gc.c
index 38bdcfd04b..253dc0afdd 100644
--- a/gc.c
+++ b/gc.c
@@ -98,6 +98,9 @@ static ruby_gc_params_t initial_params = {
#ifndef GC_PROFILE_MORE_DETAIL
#define GC_PROFILE_MORE_DETAIL 0
#endif
+#ifndef GC_ENABLE_LAZY_SWEEP
+#define GC_ENABLE_LAZY_SWEEP 1
+#endif
typedef struct gc_profile_record {
double gc_time;
@@ -2043,7 +2046,7 @@ gc_prepare_free_objects(rb_objspace_t *objspace)
{
int res;
- if (objspace->flags.dont_lazy_sweep) {
+ if (!GC_ENABLE_LAZY_SWEEP || objspace->flags.dont_lazy_sweep) {
if (heaps_increment(objspace)) {
return;
}