summaryrefslogtreecommitdiffstats
path: root/gc.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-29 07:57:24 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-29 07:57:24 +0000
commit1fcd892931d1397d2299669f377311ffb475d1dd (patch)
tree18c4c0ed798e4464c39750100cf67b8a5957ddd0 /gc.c
parentfeafc9c06833a1e45cc995024e957316358a838a (diff)
downloadruby-1fcd892931d1397d2299669f377311ffb475d1dd.tar.gz
ruby-1fcd892931d1397d2299669f377311ffb475d1dd.tar.xz
ruby-1fcd892931d1397d2299669f377311ffb475d1dd.zip
* debug.c (ruby_set_debug_option): separated from main.c.
* gc.c (ruby_gc_stress), signal.c (ruby_enable_coredump): prefixed. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12665 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gc.c b/gc.c
index e4283fb71..a21ced7bd 100644
--- a/gc.c
+++ b/gc.c
@@ -148,7 +148,7 @@ VALUE *rb_gc_stack_start = 0;
VALUE *rb_gc_register_stack_start = 0;
#endif
-int gc_stress = 0;
+int ruby_gc_stress = 0;
#ifdef DJGPP
@@ -201,7 +201,7 @@ rb_memerror(void)
static VALUE
gc_stress_get(VALUE self)
{
- return gc_stress ? Qtrue : Qfalse;
+ return ruby_gc_stress ? Qtrue : Qfalse;
}
/*
@@ -220,7 +220,7 @@ static VALUE
gc_stress_set(VALUE self, VALUE bool)
{
rb_secure(2);
- gc_stress = RTEST(bool);
+ ruby_gc_stress = RTEST(bool);
return bool;
}
@@ -235,7 +235,7 @@ ruby_xmalloc(size_t size)
if (size == 0) size = 1;
malloc_increase += size;
- if (gc_stress || malloc_increase > malloc_limit) {
+ if (ruby_gc_stress || malloc_increase > malloc_limit) {
garbage_collect();
}
RUBY_CRITICAL(mem = malloc(size));
@@ -283,7 +283,7 @@ ruby_xrealloc(void *ptr, size_t size)
if (!ptr) return ruby_xmalloc(size);
if (size == 0) size = 1;
malloc_increase += size;
- if (gc_stress) garbage_collect();
+ if (ruby_gc_stress) garbage_collect();
RUBY_CRITICAL(mem = realloc(ptr, size));
if (!mem) {
if (garbage_collect()) {
@@ -466,7 +466,7 @@ rb_newobj_from_heap(void)
{
VALUE obj;
- if (gc_stress || !freelist) {
+ if (ruby_gc_stress || !freelist) {
if(!garbage_collect()) {
rb_memerror();
}