summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-09-25 17:51:29 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-09-25 17:51:29 +0000
commit9448424dbaf7c999a9c5cfe134a35f118f3a2fea (patch)
treeb1ae1b19dcbccfc780d71b22f146cc6079ab95cd /gc.c
parentba2b829a0f154624b1b315b98de01274343b4336 (diff)
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gc.c b/gc.c
index b6b0aa8..8533773 100644
--- a/gc.c
+++ b/gc.c
@@ -41,9 +41,9 @@ static void run_final();
#ifndef GC_MALLOC_LIMIT
#if defined(MSDOS) || defined(__human68k__)
-#define GC_MALLOC_LIMIT 100000
+#define GC_MALLOC_LIMIT 200000
#else
-#define GC_MALLOC_LIMIT 4000000
+#define GC_MALLOC_LIMIT 8000000
#endif
#endif
@@ -70,6 +70,7 @@ ruby_xmalloc(size)
}
if (size == 0) size = 1;
malloc_memories += size;
+
if (malloc_memories > GC_MALLOC_LIMIT) {
rb_gc();
}
@@ -118,7 +119,7 @@ ruby_xrealloc(ptr, size)
rb_gc();
mem = realloc(ptr, size);
if (!mem)
- if (size >= 10 * 1024 * 1024) {
+ if (size >= 50 * 1024 * 1024) {
rb_raise(rb_eNoMemError, "tryed to re-allocate too big memory");
}
mem_error("failed to allocate memory(realloc)");