1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-28 16:21:07 -08:00
Commit graph

60 commits

Author SHA1 Message Date
Karl Heuer
c13ccad2a6 (make_event_array): Use assignment, not initialization. 1994-03-23 22:25:25 +00:00
Richard M. Stallman
fd80e3bbba (mark_object): Add no-op cast. 1994-03-06 22:07:19 +00:00
Richard M. Stallman
3f872b675a (ARRAY_MARK_FLAG): Definition moved to lisp.h. 1994-03-05 20:39:07 +00:00
Richard M. Stallman
cf3540e492 (memory_signal_data): No longer static.
(syms_of_alloc): Stick Qerror onto memory_signal_data.
1994-03-02 03:47:51 +00:00
Karl Heuer
bcb61d60fc (memory_full): Use new variable memory_signal_data with precomputed value
instead of trying to build it after memory is already exhausted.
1994-02-28 20:20:22 +00:00
Karl Heuer
51056d11c5 (Fgarbage_collect): Save echo_area_glyphs_length. 1994-02-10 00:35:15 +00:00
Karl Heuer
9149e74322 (mark_object): Fetch obj from *objptr at loop, not at the gotos. 1994-02-09 22:04:55 +00:00
Richard M. Stallman
31ce1c9154 (Fmemory_limit): No longer interactive. 1993-12-25 08:12:08 +00:00
Richard M. Stallman
06c5fe0034 (make_pure_string): If we USE_TEXT_PROPERTIES, set the
interval of the pure string to NULL_INTERVAL.
1993-11-10 19:55:18 +00:00
Roland McGrath
18160b98ce Include <config.h> instead of "config.h". 1993-09-10 06:15:46 +00:00
Richard M. Stallman
41f54422a4 (mark_object): Declare ptr volatile, or don't use it
after a recursive call.  Delete the aborts if ptr is clobbered.
1993-08-08 23:19:24 +00:00
Richard M. Stallman
5f60ed47d9 (compact_strings): Add USE_TEXT_PROPERTIES conditional. 1993-07-21 22:29:26 +00:00
Jim Blandy
e872064401 Consistently use the mark bit of the root interval's parent field
to say whether or not the interval tree has been visited (and skip
	it when revisited), and the mark bit of the plist field to say
	whether or not that interval has been visited (and abort if
	revisited); don't try to use the plist mark bit for both
	meanings.
	* alloc.c (mark_interval_tree): Don't test if the interval tree
	has already been visited here; let the MARK_INTERVAL_TREE macro do
	that; avoid function call overhead.  Mark the interval tree as
	having been visited by setting TREE->parent's mark bit.
	(MARK_INTERVAL_TREE): If the tree has been visited (according to
	I->parent's mark bit), don't call mark_interval_tree.
	(gc_sweep): Rebalance the interval trees of those large strings
	which are still alive.  This also clears the mark bits of those
	trees' root intervals' parent fields.
	(compact_strings): Rebalance the interval tree of each small
	strings which is still alive.  This also clears the mark bits of
	that tree's root interval's parent field.  Since the string has
	moved, update the root interval's parent pointer to contain the
	new address.
	* lisp.h (struct interval): Doc fix; explain the roles of the mark
	bits of the parent and plist members.
1993-07-18 06:26:10 +00:00
Richard M. Stallman
12ae29ebfb (mark_object) [DEBUG_MOLE]: Add abort at beginning. 1993-07-14 16:36:25 +00:00
Richard M. Stallman
5d7aa25b52 (mark_object): Add aborts in Lisp_Symbol case. 1993-06-29 21:08:31 +00:00
Jim Blandy
7d385b0569 * alloc.c (Fgarbage_collect): If the minibuffer is active, don't
display the "...done" message; allow the minibuffer to show again.
1993-06-21 00:25:57 +00:00
Jim Blandy
eb8c3be94e Apply typo patches from Paul Eggert. 1993-06-09 11:59:12 +00:00
Jim Blandy
2756d8ee8d * alloc.c (emacs_blocked_malloc, emacs_blocked_realloc): Cast the
return values of malloc and realloc, to placate compilers.
1993-06-09 03:55:55 +00:00
Richard M. Stallman
c9ca4659ed (make_event_array): Ignore bits above CHAR_META. 1993-06-07 05:30:07 +00:00
Richard M. Stallman
6b5fd105ce (mark_object): Add debugging code to check for ptr clobbered. 1993-05-27 23:48:18 +00:00
Jim Blandy
cf026b25cc * syssignal.h: Don't #include <signal.h>
* alloc.c: #include <signal.h>, but before "config.h".
1993-05-24 02:32:33 +00:00
Jim Blandy
c6c5df7f76 Updated copyright years. 1993-05-22 21:34:42 +00:00
Jim Blandy
6c523803b3 * lisp.h (Lisp_Overlay): New tag.
(OVERLAYP): New predicate.
	(CHECK_OVERLAY): New type-checker.
	(Qoverlayp): New extern declaration.
	* buffer.c (Foverlayp): New function.
	(Qoverlayp): New atom.
	(overlays_at, recenter_overlay_lists): Abort if we encounter an
	invalid overlay.
	(syms_of_buffer): defsubr Soverlayp; initialize Qoverlayp.
	(Fdelete_overlay): Set the overlay's markers to point nowhere.
	Use CHECK_OVERLAY instead of signalling a special error.
	(Fmove_overlay, Foverlay_put): Use CHECK_OVERLAY instead of
	signalling a special error.
	(Foverlay_get): Use CHECK_OVERLAY.
	* fns.c (internal_equal): Define this for overlays.
	* buffer.h (OVERLAY_VALID): Define in terms of OVERLAYP.
	* print.c (print): Give overlays their own print syntax.
	* alloc.c (mark_object): Treat overlays like conses.
1993-05-14 14:43:00 +00:00
Jim Blandy
b0846f520d * alloc.c (__malloc_hook, __realloc_hook, __free_hook): Declare
these extern, not static.  (!)

	* alloc.c (__malloc_hook, old_malloc_hook, __realloc_hook,
	old_realloc_hook): Declare that the functions these point to return
	void *, not void.
1993-04-10 07:57:21 +00:00
Jim Blandy
9ac0d9e041 Put interrupt input blocking in a separate file from xterm.h.
This isn't specific to X, and it allows us to avoid #including
	xterm.h in files that don't really have anything to do with X.
	* blockinput.h: New file.
	* xterm.h (BLOCK_INPUT, UNBLOCK_INPUT, TOTALLY_UNBLOCK_INPUT,
	UNBLOCK_INPUT_RESIGNAL): These are now in blockinput.h.
	(x_input_blocked, x_pending_input): Deleted; there are analogs
	in blockinput.h called interrupt_input_blocked and
	interrupt_input_pending.
	* keyboard.c (interrupt_input_blocked, interrupt_input_pending):
	New variables, used by the macros in blockinput.h.
	* xterm.c: #include blockinput.h.
	(x_input_blocked, x_pending_input): Deleted.
	(XTread_socket): Test and set interrupt_input_blocked and
	interrupt_input_pending instead of the old variables.
	* alloc.c, xfaces.c, xfns.c, xmenu.c, xselect.c, keymap.c:
	#include blockinput.h.
	* eval.c: #include blockinput.h instead of xterm.h.
	* keyboard.c: #include blockinput.h.
	(input_poll_signal): Just test
	interrupt_input_blocked, instead of testing HAVE_X_WINDOWS and
	x_input_blocked.

	Block the processing of interrupt input while we're manipulating the
	malloc heap.
	* alloc.c: (xfree): New function, to make it easy to free things
	safely.
	(xmalloc, xrealloc): Block X input while doing the deed.
	(VALIDATE_LISP_STORAGE, gc_sweep, compact_strings): Use xfree
	instead of free.
	(uninterrupt_malloc): New function, to install input-blocking
	hooks into the GNU malloc routines.
	* emacs.c [not SYSTEM_MALLOC] (main): Call uninterrupt_malloc
	on startup.
	* alloc.c: (make_interval, make_float, Fcons, Fmake_vector,
	Fmake_symbol, Fmake_marker, make_uninit_string, Fgarbage_collect):
	Use xmalloc instead of malloc; don't bother to check if out of
	memory here.
	(Fgarbage_collect): Call xrealloc instead of realloc.
	* buffer.c: Use xmalloc and xfree instead of malloc and free;
	don't bother to check if out of memory here.
	(Fget_buffer_create): Put BLOCK_INPUT/UNBLOCK_INPUT pair around
	calls to ralloc routines.
	* insdel.c: Same.
	* lisp.h (xfree): New extern declaration.
	* xfaces.c (xfree): Don't #define this to be free; use the
	definition in alloc.c.
	* dispnew.c, doc.c, doprnt.c, fileio.c, lread.c, term.c, xfns.c,
	xmenu.c, xterm.c: Use xfree instead of free.
	* hftctl.c: Use xfree and xmalloc instead of free and malloc.
	* keymap.c (current_minor_maps): BLOCK_INPUT while calling realloc
	and malloc.
	* search.c: Since the regexp routines can malloc, BLOCK_INPUT
	while runing them.  #include blockinput.h.
	* sysdep.c: #include blockinput.h.  Call xfree and xmalloc instead
	of free and malloc.  BLOCK_INPUT around routines which we know
	will call malloc.

	ymakefile (keyboard.o, keymap.o, search.o, sysdep.o, xfaces.o,
	xfns.o, xmenu.o, xterm.o, xselect.o, alloc.o, eval.o): Note that
	these depend on blockinput.h.
1993-03-31 10:55:33 +00:00
Richard M. Stallman
48dfbc2f80 (mark_object): Mark face_alist of a frame. 1993-03-25 17:44:56 +00:00
Richard M. Stallman
12740e58f3 Comment fix. 1993-03-12 06:27:05 +00:00
Richard M. Stallman
9e8a7331f2 (mark_object): Mark the menu_bar_items field. 1993-03-12 06:26:38 +00:00
Richard M. Stallman
736471d10e (Fmake_rope, Frope_elt): Fns deleted. 1993-03-05 23:52:49 +00:00
Jim Blandy
a3c87d4e63 Use the term scroll bar', instead of scrollbar'.
* alloc.c, frame.c, frame.h, indent.c, keyboard.c, keyboard.h,
	lisp.h, term.c, termhooks.h, window.c, window.h, xdisp.c, xfns.c,
	xterm.c, xterm.h: Terminology changed.
1993-03-02 08:22:42 +00:00
Richard M. Stallman
d393c06819 (mark_interval): Add ignored arg.
(mark_interval_tree): Pass new arg to traverse_intervals.
1993-02-25 20:24:25 +00:00
Jim Blandy
6d19f28ad1 * alloc.c (make_pure_float): Assure that PUREBEG + pureptr is
aligned, not pureptr itself.
1993-02-23 11:49:39 +00:00
Jim Blandy
fe90ad9766 * alloc.c (make_pure_float): Align pureptr according to __alignof,
if it's available, or sizeof (struct Lisp_Float) if it's not.
1993-02-22 16:21:17 +00:00
Jim Blandy
1a4f1e2c64 * alloc.c (make_pure_float): Align pureptr on a sizeof (double)
boundary before allocating the float.

	* alloc.c: Add description lines to the top of each page.

	* alloc.c (mark_interval_tree): Remove spurious & in front of
	function name.

	* alloc.c (UNMARK_BALANCE_INTERVALS): Fix to accomodate compilers
	other than GCC, which do not allow casts on the LHS of an
	assignment.

	* alloc.c (mark_object, mark_buffer): Remove some unused
	variables.
1993-02-22 14:22:03 +00:00
Richard M. Stallman
e41ae81fbf (Fmemory_limit): Doc fix. 1993-02-20 17:36:06 +00:00
Jim Blandy
7c299e7aa4 Make scrollbar structures into lisp objects, so that they can be
GC'd; this allows windows and scrollbars can refer to each other
	without worrying about dangling pointers.
	* xterm.h (struct x_display): vertical_scrollbars and
	judge_timestamp members deleted.
	(struct scrollbar): Redesigned to be a template for a Lisp_Vector.
	(SCROLLBAR_VEC_SIZE, XSCROLLBAR, SCROLLBAR_PACK, SCROLLBAR_UNPACK,
	SCROLLBAR_X_WINDOW, SET_SCROLLBAR_X_WINDOW,
	VERTICAL_SCROLLBAR_INSIDE_WIDTH, VERTICAL_SCROLLBAR_TOP_RANGE,
	VERTICAL_SCROLLBAR_INSIDE_HEIGHT, VERTICAL_SCROLLBAR_MIN_HANDLE):
	New macros, to help deal with the lispy structures, and deal with
	the graphics.
	* frame.h (WINDOW_VERTICAL_SCROLLBAR): Macro deleted.
	(struct frame): New fields `scrollbars' and
	`condemned_scrollbars', for use by the scrollbar implementation.
	[MULTI_FRAME and not MULTI_FRAME] (FRAME_SCROLLBARS,
	FRAME_CONDEMNED_SCROLLBARS): Accessors for the new field.
	* window.h (struct window): Doc fix for vertical_scrollbar field.
	* frame.c (make_frame): Initialize the `scrollbars' and
	`condemned_scrollbars' fields of the new frame.
	* alloc.c (mark_object): Mark the `scrollbars' and
	`condemned_scrollbars' slots of frames.
	* xterm.c (x_window_to_scrollbar): Scrollbars are chained on
	frames' scrollbar field, not their x.display->vertical_scrollbars
	field.
	(x_scrollbar_create, x_scrollbar_set_handle, x_scrollbar_move,
	x_scrollbar_remove, XTset_vertical_scrollbar,
	XTcondemn_scrollbars, XTredeem_scrollbar, XTjudge_scrollbars,
	x_scrollbar_expose, x_scrollbar_handle_click,
	x_scrollbar_handle_motion): Substantially rewritten to correct
	typos and brainos, and to accomodate the lispy structures.
1993-01-14 15:17:39 +00:00
Jim Blandy
d0f7e1511e * alloc.c: #include "frame.h" unconditionally. frame.h does the
right thing when MULTI_FRAME isn't defined.
1992-11-07 06:59:38 +00:00
Jim Blandy
5bc1518a3d * alloc.c (Frope_elt): Declare arguments to be Lisp_Objects. 1992-10-31 04:50:13 +00:00
Joseph Arceneaux
433c217556 * alloc.c (mark_interval_tree): Pass 0 as initial depth argument
to traverse_intervals().
1992-10-14 23:10:56 +00:00
Jim Blandy
0d73ca8156 * alloc.c (Fmemory_limit): Explain why we divide by 1024.
Don't bother trying to display the size in the minibuffer.
1992-10-07 20:42:40 +00:00
Jim Blandy
20d2471455 * alloc.c (Fmemory_limit): New function.
(syms_of_alloc): Defsubr it.
1992-10-03 08:36:49 +00:00
Joseph Arceneaux
350273a493 Fixed typos. 1992-10-03 00:08:23 +00:00
Joseph Arceneaux
d5e35230b5 * alloc.c: #include "intervals.h".
(init_intervals, make_interval,
	mark_interval, mark_interval_tree): New functions conditionally
	defined.
	(make_uninit_string): Call INITIALIZE_INTERVAL.
	(INIT_INTERVALS, UNMARK_BALANCE_INTERVALS, MARK_INTERVAL_TREE):
	New macros, conditionally defined.
	(mark_object): Call MARK_INTERVAL_TREE in case Lisp_String.
	(gc_sweep): If text properties are in use, place all unmarked
	intervals on the free list.  Call UNMARK_BALANCE_INTERVALS on
	`buffer->intervals' when unmarking `buffer'.
	(compact_strings): Include INTERVAL_PTR_SIZE in calculation for
	target of bcopy when relocating strings.
	(init_alloc_once): Call INIT_INTERVALS.
	(make_pure_string): Include INTERVAL_PTR_SIZE in calculation of
	`size'.
1992-10-02 19:59:42 +00:00
Richard M. Stallman
c54ca9516b (mark_object): Avoid car recursion on cons with nil in cdr.
Avoid recursion on constants-vector of a compiled function.
1992-10-01 23:07:09 +00:00
Richard M. Stallman
785cd37f2b (mark_object): Save last 500 values of objptr.
Check for clobberage of ptr, when marking a vector.
1992-09-19 17:52:29 +00:00
Jim Blandy
8aaa7c8a2e * alloc.c (mark_object): mark a symbol's name after marking its
value, function, and property list rather than before; this way,
	symbols' names are readable, giving us a chance to detect some
	kinds of heap corruption.
1992-09-13 12:14:54 +00:00
Jim Blandy
64aeaceb93 * alloc.c (Fmake_marker): Removed the test for being called from a
signal handler.  The original bug is probably gone, the test
	wasn't written portably, and it should probably go somewhere else
	anyway - say, funcall or eval.
1992-08-19 06:18:07 +00:00
Jim Blandy
42a9cd6a9c * alloc.c (Fgarbage_collect): Doc fix. 1992-08-14 02:34:06 +00:00
Jim Blandy
502b9b6441 entered into RCS 1992-07-13 19:54:34 +00:00
Jim Blandy
daa3760289 *** empty log message *** 1992-06-24 05:09:26 +00:00