From 719b242f866ff9ecd9e358c5f68c5650608d2991 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 7 Feb 1995 22:43:23 +0000 Subject: [PATCH] (r_alloc_size_in_use): New function. (r_alloc_free): Call refill_memory_reserve. --- src/ralloc.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/ralloc.c b/src/ralloc.c index 5a2e507feb2..f27d0c64636 100644 --- a/src/ralloc.c +++ b/src/ralloc.c @@ -347,6 +347,15 @@ relinquish () abort (); } } + +/* Return the total size in use by relocating allocator, + above where malloc gets space. */ + +long +r_alloc_size_in_use () +{ + return break_value - virtual_break_value; +} /* The meat - allocating, freeing, and relocating blocs. */ @@ -890,6 +899,8 @@ r_alloc_free (ptr) free_bloc (dead_bloc); *ptr = 0; + + refill_memory_reserve (); } /* Given a pointer at address PTR to relocatable data, resize it to SIZE. -- 2.39.5