diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-10-10 17:11:18 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-10-10 17:11:18 +0000 |
commit | 539428b0f497c03d87b50a8a1b58e0795e94a3bd (patch) | |
tree | d32d0134a571e4a9d466700f0faa5c840d473962 /gc.c | |
parent | a3b6e114b4b01e069136be3ee9383ecc6891ca8f (diff) | |
download | ruby-539428b0f497c03d87b50a8a1b58e0795e94a3bd.tar.gz |
rename malloc_memories to malloc_increase. [ruby-cvs:05237]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -60,7 +60,7 @@ void *alloca (); #endif #endif -static unsigned long malloc_memories = 0; +static unsigned long malloc_increase = 0; static unsigned long malloc_limit = GC_MALLOC_LIMIT; static void run_final(); static VALUE nomem_error; @@ -88,9 +88,9 @@ ruby_xmalloc(size) rb_raise(rb_eNoMemError, "negative allocation size (or too big)"); } if (size == 0) size = 1; - malloc_memories += size; + malloc_increase += size; - if (malloc_memories > malloc_limit) { + if (malloc_increase > malloc_limit) { rb_gc(); } RUBY_CRITICAL(mem = malloc(size)); @@ -129,7 +129,7 @@ ruby_xrealloc(ptr, size) } if (!ptr) return xmalloc(size); if (size == 0) size = 1; - malloc_memories += size; + malloc_increase += size; RUBY_CRITICAL(mem = realloc(ptr, size)); if (!mem) { rb_gc(); @@ -966,7 +966,7 @@ gc_sweep() } } malloc_limit = live; - malloc_memories = 0; + malloc_increase = 0; if (freed < FREE_MIN) { add_heap(); } |