diff options
author | Richard M. Stallman <rms@gnu.org> | 2005-10-30 07:34:05 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2005-10-30 07:34:05 +0000 |
commit | c4b5ab1bdd61165235cb874489967339570411f3 (patch) | |
tree | 845ee36df65e8e21476f5e14770c904eeb0a7f10 /src/alloc.c | |
parent | f22def706c9b7917f482c2197309af6e56daa738 (diff) | |
download | emacs-c4b5ab1bdd61165235cb874489967339570411f3.tar.gz |
(BYTES_USED): Use uordblks, not arena.
(bytes_used_when_reconsidered): New variable.
(emacs_blocked_free): Set that.
Diffstat (limited to 'src/alloc.c')
-rw-r--r-- | src/alloc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/alloc.c b/src/alloc.c index 90ef4ba4e81..5f4026b4cfb 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -138,6 +138,8 @@ static pthread_mutex_t alloc_mutex; static __malloc_size_t bytes_used_when_full; +static __malloc_size_t bytes_used_when_reconsidered; + /* Mark, unmark, query mark bit of a Lisp string. S must be a pointer to a struct Lisp_String. */ @@ -521,7 +523,7 @@ display_malloc_warning () #ifdef DOUG_LEA_MALLOC -# define BYTES_USED (mallinfo ().arena) +# define BYTES_USED (mallinfo ().uordblks) #else # define BYTES_USED _bytes_used #endif @@ -1179,7 +1181,7 @@ emacs_blocked_free (ptr, ptr2) The code here is correct as long as SPARE_MEMORY is substantially larger than the block size malloc uses. */ && (bytes_used_when_full - > ((bytes_used_now = BYTES_USED) + > ((bytes_used_when_reconsidered = BYTES_USED) + max (malloc_hysteresis, 4) * SPARE_MEMORY))) refill_memory_reserve (); |