From 4455ad75c5aba5dc4bae53fe271fea8b391b4a54 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 1 Sep 2002 13:37:41 +0000 Subject: [PATCH] (display_malloc_warning): Use display-warning. (malloc_warning_1): Function deleted. [ALLOC_DEBUG]: #undef INLINE. --- src/alloc.c | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/src/alloc.c b/src/alloc.c index 1d7c9044c7c..8a487214479 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -22,6 +22,10 @@ Boston, MA 02111-1307, USA. */ #include #include +#ifdef ALLOC_DEBUG +#undef INLINE +#endif + /* Note that this declares bzero on OSF/1. How dumb. */ #include @@ -422,23 +426,7 @@ static POINTER_TYPE *pure_alloc P_ ((size_t, int)); Malloc ************************************************************************/ -/* Write STR to Vstandard_output plus some advice on how to free some - memory. Called when memory gets low. */ - -Lisp_Object -malloc_warning_1 (str) - Lisp_Object str; -{ - Fprinc (str, Vstandard_output); - write_string ("\nKilling some buffers may delay running out of memory.\n", -1); - write_string ("However, certainly by the time you receive the 95% warning,\n", -1); - write_string ("you should clean up, kill this Emacs, and start a new one.", -1); - return Qnil; -} - - -/* Function malloc calls this if it finds we are near exhausting - storage. */ +/* Function malloc calls this if it finds we are near exhausting storage. */ void malloc_warning (str) @@ -448,16 +436,16 @@ malloc_warning (str) } -/* Display a malloc warning in buffer *Danger*. */ +/* Display an already-pending malloc warning. */ void display_malloc_warning () { - register Lisp_Object val; - - val = build_string (pending_malloc_warning); + call3 (intern ("display-warning"), + intern ("alloc"), + build_string (pending_malloc_warning), + intern ("emergency")); pending_malloc_warning = 0; - internal_with_output_to_temp_buffer (" *Danger*", malloc_warning_1, val); } -- 2.39.5