changeset 62335:401714f3f9de

(Fmemory_full_p): New function. (syms_of_alloc): defsubr it.
author Richard M. Stallman <rms@gnu.org>
date Sat, 14 May 2005 14:07:03 +0000
parents f9dc4e8a41fe
children d86e84b2256d
files src/alloc.c
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/alloc.c	Sat May 14 14:06:33 2005 +0000
+++ b/src/alloc.c	Sat May 14 14:07:03 2005 +0000
@@ -534,6 +534,12 @@
     Fsignal (Qnil, Vmemory_signal_data);
 }
 
+DEFUN ("memory-full-p", Fmemory_full_p, Smemory_full_p, 0, 0, 0,
+       doc: /* t if memory is nearly full, nil otherwise.  */)
+  ()
+{
+  return (spare_memory ? Qnil : Qt);
+}
 
 /* Called if we can't allocate relocatable space for a buffer.  */
 
@@ -6078,6 +6084,7 @@
   DEFVAR_INT ("gcs-done", &gcs_done,
 	      doc: /* Accumulated number of garbage collections done.  */);
 
+  defsubr (&Smemory_full_p);
   defsubr (&Scons);
   defsubr (&Slist);
   defsubr (&Svector);