/[emacs]/emacs/src/alloc.c
ViewVC logotype

Diff of /emacs/src/alloc.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.279 by rms, Wed Aug 7 14:37:32 2002 UTC revision 1.280 by rms, Sun Sep 1 13:37:41 2002 UTC
# Line 22  Boston, MA 02111-1307, USA.  */ Line 22  Boston, MA 02111-1307, USA.  */
22  #include <config.h>  #include <config.h>
23  #include <stdio.h>  #include <stdio.h>
24    
25    #ifdef ALLOC_DEBUG
26    #undef INLINE
27    #endif
28    
29  /* Note that this declares bzero on OSF/1.  How dumb.  */  /* Note that this declares bzero on OSF/1.  How dumb.  */
30    
31  #include <signal.h>  #include <signal.h>
# Line 422  static POINTER_TYPE *pure_alloc P_ ((siz Line 426  static POINTER_TYPE *pure_alloc P_ ((siz
426                                  Malloc                                  Malloc
427   ************************************************************************/   ************************************************************************/
428    
429  /* Write STR to Vstandard_output plus some advice on how to free some  /* Function malloc calls this if it finds we are near exhausting storage.  */
    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.  */  
430    
431  void  void
432  malloc_warning (str)  malloc_warning (str)
# Line 448  malloc_warning (str) Line 436  malloc_warning (str)
436  }  }
437    
438    
439  /* Display a malloc warning in buffer *Danger*.  */  /* Display an already-pending malloc warning.  */
440    
441  void  void
442  display_malloc_warning ()  display_malloc_warning ()
443  {  {
444    register Lisp_Object val;    call3 (intern ("display-warning"),
445             intern ("alloc"),
446    val = build_string (pending_malloc_warning);           build_string (pending_malloc_warning),
447             intern ("emergency"));
448    pending_malloc_warning = 0;    pending_malloc_warning = 0;
   internal_with_output_to_temp_buffer (" *Danger*", malloc_warning_1, val);  
449  }  }
450    
451    

Legend:
Removed from v.1.279  
changed lines
  Added in v.1.280

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26