aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* * 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