summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authortarui <tarui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-29 16:32:59 +0000
committertarui <tarui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-29 16:32:59 +0000
commitd0914b355289eaa0498928752466d2ec5660cf2a (patch)
tree9dd2447b6331090f7b19ade4f2fe366321c2bb3e /gc.c
parent2c1a7dc85eceb869c4c8c517b61c28335fc881f4 (diff)
* thread.c (RB_GC_SAVE_MACHINE_CONTEXT): start GC
by switching the thread if gc_stress == true * gc.c (ruby_gc_stress_start): dotto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gc.c b/gc.c
index b0a6dcf6c0..44d04caf16 100644
--- a/gc.c
+++ b/gc.c
@@ -517,6 +517,14 @@ gc_stress_get(VALUE self)
return ruby_gc_stress ? Qtrue : Qfalse;
}
+void
+ruby_gc_stress_start(void)
+{
+ rb_objspace_t *objspace = &rb_objspace;
+ if(ruby_gc_stress)
+ rb_gc();
+}
+
/*
* call-seq:
* GC.stress = bool -> bool