summaryrefslogtreecommitdiff
path: root/src/alloc.c
Commit message (Collapse)AuthorAgeFilesLines
* (mark_object): Declare ptr volatile, or don't use itRichard M. Stallman1993-08-081-29/+16
| | | | after a recursive call. Delete the aborts if ptr is clobbered.
* (compact_strings): Add USE_TEXT_PROPERTIES conditional.Richard M. Stallman1993-07-211-0/+2
|
* Consistently use the mark bit of the root interval's parent fieldJim Blandy1993-07-181-21/+45
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* (mark_object) [DEBUG_MOLE]: Add abort at beginning.Richard M. Stallman1993-07-141-0/+5
|
* (mark_object): Add aborts in Lisp_Symbol case.Richard M. Stallman1993-06-291-0/+8
|
* * alloc.c (Fgarbage_collect): If the minibuffer is active, don'tJim Blandy1993-06-211-1/+1
| | | | display the "...done" message; allow the minibuffer to show again.
* Apply typo patches from Paul Eggert.Jim Blandy1993-06-091-2/+2
|
* * alloc.c (emacs_blocked_malloc, emacs_blocked_realloc): Cast theJim Blandy1993-06-091-2/+2
| | | | return values of malloc and realloc, to placate compilers.
* (make_event_array): Ignore bits above CHAR_META.Richard M. Stallman1993-06-071-2/+3
|
* (mark_object): Add debugging code to check for ptr clobbered.Richard M. Stallman1993-05-271-0/+4
|
* * syssignal.h: Don't #include <signal.h>Jim Blandy1993-05-241-0/+1
| | | | * alloc.c: #include <signal.h>, but before "config.h".
* Updated copyright years.Jim Blandy1993-05-221-1/+1
|
* * lisp.h (Lisp_Overlay): New tag.Jim Blandy1993-05-141-0/+1
| | | | | | | | | | | | | | | | | | | | (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.
* * alloc.c (__malloc_hook, __realloc_hook, __free_hook): DeclareJim Blandy1993-04-101-10/+13
| | | | | | | | 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.
* Put interrupt input blocking in a separate file from xterm.h.Jim Blandy1993-03-311-28/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* (mark_object): Mark face_alist of a frame.Richard M. Stallman1993-03-251-0/+1
|
* Comment fix.Richard M. Stallman1993-03-121-1/+1
|
* (mark_object): Mark the menu_bar_items field.Richard M. Stallman1993-03-121-0/+1
|
* (Fmake_rope, Frope_elt): Fns deleted.Richard M. Stallman1993-03-051-59/+14
|
* Use the term `scroll bar', instead of `scrollbar'.Jim Blandy1993-03-021-2/+2
| | | | | | * 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.
* (mark_interval): Add ignored arg.Richard M. Stallman1993-02-251-2/+3
| | | | (mark_interval_tree): Pass new arg to traverse_intervals.
* * alloc.c (make_pure_float): Assure that PUREBEG + pureptr isJim Blandy1993-02-231-9/+14
| | | | aligned, not pureptr itself.
* * alloc.c (make_pure_float): Align pureptr according to __alignof,Jim Blandy1993-02-221-1/+11
| | | | if it's available, or sizeof (struct Lisp_Float) if it's not.
* * alloc.c (make_pure_float): Align pureptr on a sizeof (double)Jim Blandy1993-02-221-15/+34
| | | | | | | | | | | | | | | | 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.
* (Fmemory_limit): Doc fix.Richard M. Stallman1993-02-201-1/+1
|
* Make scrollbar structures into lisp objects, so that they can beJim Blandy1993-01-141-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* * alloc.c: #include "frame.h" unconditionally. frame.h does theJim Blandy1992-11-071-2/+0
| | | | right thing when MULTI_FRAME isn't defined.
* * alloc.c (Frope_elt): Declare arguments to be Lisp_Objects.Jim Blandy1992-10-311-0/+1
|
* * alloc.c (mark_interval_tree): Pass 0 as initial depth argumentJoseph Arceneaux1992-10-141-1/+1
| | | | to traverse_intervals().
* * alloc.c (Fmemory_limit): Explain why we divide by 1024.Jim Blandy1992-10-071-5/+2
| | | | Don't bother trying to display the size in the minibuffer.
* * alloc.c (Fmemory_limit): New function.Jim Blandy1992-10-031-0/+20
| | | | (syms_of_alloc): Defsubr it.
* Fixed typos.Joseph Arceneaux1992-10-031-4/+4
|
* * alloc.c: #include "intervals.h".Joseph Arceneaux1992-10-021-2/+150
| | | | | | | | | | | | | | | | | | (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'.
* (mark_object): Avoid car recursion on cons with nil in cdr.Richard M. Stallman1992-10-011-15/+33
| | | | Avoid recursion on constants-vector of a compiled function.
* (mark_object): Save last 500 values of objptr.Richard M. Stallman1992-09-191-1/+14
| | | | Check for clobberage of ptr, when marking a vector.
* * alloc.c (mark_object): mark a symbol's name after marking itsJim Blandy1992-09-131-2/+2
| | | | | | 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.
* * alloc.c (Fmake_marker): Removed the test for being called from aJim Blandy1992-08-191-7/+0
| | | | | | 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.
* * alloc.c (Fgarbage_collect): Doc fix.Jim Blandy1992-08-141-1/+1
|
* entered into RCSJim Blandy1992-07-131-19/+19
|
* *** empty log message ***Jim Blandy1992-06-241-1/+1
|
* *** empty log message ***Jim Blandy1992-05-181-3/+9
|
* *** empty log message ***Jim Blandy1992-05-101-3/+5
|
* *** empty log message ***Jim Blandy1992-05-011-2/+3
|
* *** empty log message ***Noah Friedman1992-03-251-1/+1
|
* *** empty log message ***Jim Blandy1992-03-201-2/+7
|
* *** empty log message ***Jim Blandy1992-01-131-5/+5
|
* *** empty log message ***Jim Blandy1991-11-261-10/+1
|
* *** empty log message ***Jim Blandy1991-07-281-1/+1
|
* *** empty log message ***Jim Blandy1991-07-261-0/+13
|
* Initial revisionJim Blandy1991-06-261-0/+1913