diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-09-25 17:51:29 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-09-25 17:51:29 +0000 |
| commit | 7dab9e1557d87ce9f76f7ec5be0c6bb0b395beb4 (patch) | |
| tree | b1ae1b19dcbccfc780d71b22f146cc6079ab95cd /gc.c | |
| parent | 92d589dbedc67be0f8a6d781bebc2c564fe24acc (diff) | |
| download | ruby-7dab9e1557d87ce9f76f7ec5be0c6bb0b395beb4.tar.gz ruby-7dab9e1557d87ce9f76f7ec5be0c6bb0b395beb4.tar.xz ruby-7dab9e1557d87ce9f76f7ec5be0c6bb0b395beb4.zip | |
matz
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
| -rw-r--r-- | gc.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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)"); |
