From 539428b0f497c03d87b50a8a1b58e0795e94a3bd Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 10 Oct 2002 17:11:18 +0000 Subject: 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 --- gc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gc.c') diff --git a/gc.c b/gc.c index 64907e9686..a7486aa9f3 100644 --- a/gc.c +++ b/gc.c @@ -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(); } -- cgit v1.2.3