summaryrefslogtreecommitdiffstats
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
commit2f592086532d3d9bb03288bd5d51a7baf46836df (patch)
tree20a1bebec983543fb38b5809a75228ff1136a4a7 /gc.c
parent672eb338535e5a7cb4395cd96c155d8de3c34cd3 (diff)
downloadruby-2f592086532d3d9bb03288bd5d51a7baf46836df.tar.gz
ruby-2f592086532d3d9bb03288bd5d51a7baf46836df.tar.xz
ruby-2f592086532d3d9bb03288bd5d51a7baf46836df.zip
matz
git-svn-id: http://svn.ruby-lang.org/repos/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 d7d7c2679..0db6354df 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;
}