summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-08-02 04:54:21 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-08-02 04:54:21 +0000
commitf32c76a2668cdbee36f1c6515693b41428f865e7 (patch)
tree20a1bebec983543fb38b5809a75228ff1136a4a7 /gc.c
parent1a9a0e7d98bd17964128b321d4dcfa18f0b05ed5 (diff)
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@869 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 d7d7c26..0db6354 100644
--- a/gc.c
+++ b/gc.c
@@ -901,7 +901,10 @@ rb_gc()
#endif
if (dont_gc || during_gc || rb_prohibit_interrupt || ruby_in_compile) {
- add_heap();
+ if (!freelist || malloc_memories > GC_MALLOC_LIMIT) {
+ malloc_memories = 0;
+ add_heap();
+ }
return;
}