]> git.eshelyaron.com Git - emacs.git/commitdiff
(BYTES_USED): Use uordblks, not arena.
authorRichard M. Stallman <rms@gnu.org>
Sun, 30 Oct 2005 07:36:35 +0000 (07:36 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sun, 30 Oct 2005 07:36:35 +0000 (07:36 +0000)
(bytes_used_when_reconsidered): New variable.
(emacs_blocked_free): Set that.

src/ChangeLog
src/alloc.c

index f27a762b2109848d22813e9d7c5a9249de057e09..c6750bc70c087cbfff47c0f9947946353f90449a 100644 (file)
@@ -1,9 +1,17 @@
+2005-10-30  Richard M. Stallman  <rms@gnu.org>
+
+       * alloc.c (BYTES_USED): Use uordblks, not arena.
+       (bytes_used_when_reconsidered): New variable.
+       (emacs_blocked_free): Set that.
+
 2005-10-29  Chong Yidong  <cyd@stupidchicken.com>
 
        * alloc.c (emacs_blocked_free): Fix typo.
 
 2005-10-29  Richard M. Stallman  <rms@gnu.org>
 
+       * data.c (Fmake_variable_frame_local): Doc fix.
+
        * xdisp.c (handle_fontified_prop): Do nothing if memory full.
        (format_mode_line_unwind_data): New arg SAVE_PROPTRANS
        controls whether to save and restore mode_line_proptrans_alist.
index 90ef4ba4e815dc10882e4112e41c0baab7600b10..5f4026b4cfb7cbfe6d78fe461e92b90191dc4f5d 100644 (file)
@@ -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 ();