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. */
#ifndef make_number
Lisp_Object
make_number (n)
- int n;
+ EMACS_INT n;
{
Lisp_Object obj;
obj.s.val = n;
mmap'ed data typically have an address towards the top of the
address space, which won't fit into an EMACS_INT (at least on
32-bit systems with the current tagging scheme). --fx */
+ BLOCK_INPUT;
mallopt (M_MMAP_MAX, 0);
+ UNBLOCK_INPUT;
#endif
b = (struct sblock *) lisp_malloc (size + GC_STRING_EXTRA, MEM_TYPE_NON_LISP);
#ifdef DOUG_LEA_MALLOC
/* Back to a reasonable maximum of mmap'ed areas. */
+ BLOCK_INPUT;
mallopt (M_MMAP_MAX, MMAP_MAX_AREAS);
+ UNBLOCK_INPUT;
#endif
b->next_free = &b->first_data;
}
-/* Return a newly created sub char table with default value DEFALT.
+/* Return a newly created sub char table with slots initialized by INIT.
Since a sub char table does not appear as a top level Emacs Lisp
object, we don't need a Lisp interface to make it. */
Lisp_Object
-make_sub_char_table (defalt)
- Lisp_Object defalt;
+make_sub_char_table (init)
+ Lisp_Object init;
{
Lisp_Object vector
- = Fmake_vector (make_number (SUB_CHAR_TABLE_STANDARD_SLOTS), Qnil);
+ = Fmake_vector (make_number (SUB_CHAR_TABLE_STANDARD_SLOTS), init);
XCHAR_TABLE (vector)->top = Qnil;
- XCHAR_TABLE (vector)->defalt = defalt;
+ XCHAR_TABLE (vector)->defalt = Qnil;
XSETCHAR_TABLE (vector, XCHAR_TABLE (vector));
return vector;
}
if (pure_bytes_used_before_overflow)
return Qnil;
+ CHECK_CONS_LIST ();
+
/* Don't keep undo information around forever.
Do this early on, so it is no problem if the user quits. */
{
UNBLOCK_INPUT;
+ CHECK_CONS_LIST ();
+
/* clear_marks (); */
gc_in_progress = 0;
DEFVAR_INT ("gcs-done", &gcs_done,
doc: /* Accumulated number of garbage collections done. */);
+ defsubr (&Smemory_full_p);
defsubr (&Scons);
defsubr (&Slist);
defsubr (&Svector);