aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* [STDC_HEADERS]: Include stddef.h.Eli Zaretskii2006-04-081-0/+4
|
* * process.h (struct Lisp_Process): Replace Lisp_Objects `pid',Stefan Monnier2006-04-081-4/+12
| | | | | | | | | | | | | | | | | | `raw_status_high', and `raw_status_low' with plain integers, and move them to the end of the structure. * alloc.c (allocate_process): Use PSEUDOVECSIZE to initialize the pseudovector's size field so only the Lisp_Object fields get GC'd. * process.c (update_status, make_process, Fdelete_process) (Fprocess_status, list_processes_1, start_process_unwind) (create_process, Fmake_network_process, server_accept_connection) (wait_reading_process_output, send_process, Fprocess_running_child_p) (process_send_signal, proc_encode_coding_system, Fprocess_send_eof) (sigchld_handler, status_notify): Adjust to new non-Lisp fields for `pid' and `raw_status'. (Fprocess_id, Fsignal_process): Same, and additionally use floats when representing PIDs that are larger than most-positive-fixnum.
* (USE_POSIX_MEMALIGN): Fix last change.Kim F. Storm2006-03-101-1/+3
|
* (USE_POSIX_MEMALIGN): New macro.Stefan Monnier2006-03-091-3/+7
| | | | (ABLOCKS_BASE, lisp_align_malloc, lisp_align_free): Use it.
* (Fmake_symbol): Comment-out left-over assert from before we added BLOCK_INPUTs.Stefan Monnier2006-02-171-1/+1
|
* (Fmake_bool_vector, Fpurecopy): Doc fixes.Juanma Barranquero2006-02-091-2/+2
|
* * alloc.c (make_interval, allocate_string)Chong Yidong2006-01-271-8/+73
| | | | | | (allocate_string_data, make_float, Fcons, allocate_vectorlike) (Fmake_symbol, allocate_misc): Use BLOCK_INPUT when accessing global variables.
* (check_pure_size): Make overflow message an "error message".Richard M. Stallman2006-01-261-1/+1
|
* * alloc.c (allocate_string_data): Update next_free immediately, toChong Yidong2006-01-241-1/+2
| | | | reduce risk of memory clobberage.
* (lisp_align_free): Add an assertion.Stefan Monnier2006-01-231-1/+19
| | | | | (make_interval, allocate_string, make_float, allocate_misc, Fmake_symbol (Fcons): If ENABLE_CHECKING is on, check we're not called from a sighandler.
* Comment and whitespace changes.Richard M. Stallman2005-12-111-5/+6
|
* Include fcntl.h. Define O_WRONLY if not defined.Kim F. Storm2005-11-301-4/+28
| | | | | (valid_lisp_object_p) [!GC_MARK_STACK]: Validate pointer by passing it to `emacs_write'.
* (free_float): Make free list chaining aliasing-safe.Andreas Schwab2005-11-151-14/+14
| | | | | | | | | | | (make_float): Likewise. (free_cons): Likewise. (Fcons): Likewise. (check_cons_list): Likewise. (Fmake_symbol): Likewise. (allocate_misc): Likewise. (free_misc): Likewise. (gc_sweep): Likewise.
* (valid_lisp_object_p): New function to validate thatKim F. Storm2005-11-091-2/+71
| | | | an object is really a valid Lisp_Object.
* (refill_memory_reserve): Move decl out of conditionals.Richard M. Stallman2005-11-031-1/+2
|
* (BYTES_USED): Use uordblks, not arena.Richard M. Stallman2005-10-301-2/+4
| | | | | (bytes_used_when_reconsidered): New variable. (emacs_blocked_free): Set that.
* * alloc.c (emacs_blocked_free): Fix typo.Chong Yidong2005-10-291-1/+1
|
* (syms_of_alloc) <memory-full>: Doc fix.Richard M. Stallman2005-10-291-64/+102
| | | | | | | | | | | | | (Fmemory_full_p): Function deleted. (syms_of_alloc): Don't defsubr it. (memory_full_cons_threshold): New variable. (spare_memory): Now a vector of 7 elts. (buffer_memory_full): Don't set Vmemory_full here. (xfree): Don't try to refill here. (emacs_blocked_free): Record BYTES_USED in local var. (memory_full): Now free all the slots in spare_memory. (refill_memory_reserve): Allocate each slot in spare_memory. (init_alloc_once): Call refill_memory_reserve.
* (spare_memory): No longer static.Richard M. Stallman2005-10-281-1/+7
| | | | (xfree) [!SYSTEM_MALLOC]: Call refill_memory_reserve.
* (refill_memory_reserve): Conditionalize the body, not the function's existence.Richard M. Stallman2005-10-041-14/+15
|
* * image.c (slurp_file, xbm_read_bitmap_data): Cast to the correctDan Nicolaescu2005-09-301-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | type. * xterm.c (handle_one_xevent, handle_one_xevent): Likewise. * unexelf.c (fatal): Fix prototype. * term.c (fatal): Implement using varargs. * regex.c (re_char): Move typedef ... * regex.h (re_char): ... here. (re_iswctype, re_wctype, re_set_whitespace_regexp): New prototypes. * emacs.c (malloc_set_state): Fix return type. (endif): Fix type. * lisp.h (fatal): Add argument types. * dispextern.h (fatal): Delete prototype. * systime.h: (make_time): Prototype moved from ... * editfns.c (make_time): ... here. * editfns.c: Move systime.h include after lisp.h. * dired.c: * xsmfns.c: * process.c: Likewise. * alloc.c (old_malloc_hook, old_realloc_hook, old_realloc_hook): Add parameter types. (__malloc_hook, __realloc_hook, __free_hook): Fix prototypes. (emacs_blocked_free): Change definition to match __free_hook. (emacs_blocked_malloc): Change definition to match __malloc_hook. (emacs_blocked_realloc): Change definition to match __realloc_hook.
* (gc_cons_threshold): Not static.Richard M. Stallman2005-07-231-10/+13
| | | | | | | (gc_cons_combined_threshold): Var deleted. (gc_relative_threshold): New variable. (Fgarbage_collect, init_alloc_once): Compute gc_relative_threshold instead of gc_cons_combined_threshold.
* (gc_cons_threshold): Make it static.Stefan Monnier2005-07-131-1/+1
|
* (gc_cons_combined_threshold, Vgc_cons_percentage): New vars.Stefan Monnier2005-07-131-1/+32
| | | | | (Fgarbage_collect, init_alloc_once): Set gc_cons_combined_threshold. (syms_of_alloc): Declare gc-cons-percentage.
* Update FSF's address.Lute Kamstra2005-07-041-2/+2
|
* Fix typo in comment.Juanma Barranquero2005-05-241-1/+1
|
* (Fmemory_full_p): New function.Richard M. Stallman2005-05-141-0/+7
| | | | (syms_of_alloc): defsubr it.
* (make_sub_char_table): Argument changed to initialKenichi Handa2005-04-201-5/+5
| | | | value of the slots.
* (Fgarbage_collect): Call CHECK_CONS_LIST before and after gc.Kim F. Storm2005-04-031-0/+4
|
* * alloc.c (allocate_string_data): Call BLOCK_INPUT before callingJan Djärv2005-04-021-0/+4
| | | | | | mallopt. * ralloc.c (r_alloc_init): Ditto.
* (make_number): The arg can be bigger than `int'.Stefan Monnier2005-03-241-1/+1
|
* (BLOCK_BYTES): Harmless typo.Stefan Monnier2005-02-181-5/+6
|
* (STRING_MARKED_P, VECTOR_MARKED_P): Return boolean.Kim F. Storm2005-01-201-2/+2
|
* (mark_fringe_data): Declare extern.Kim F. Storm2005-01-061-0/+10
| | | | | | | (Fgarbage_collect): Call mark_fringe_data. (overrun_check_free): Invalidate freed memory if XMALLOC_CLEAR_FREE_MEMORY is defined.
* (refill_memory_reserve): Move.Stefan Monnier2005-01-041-17/+21
| | | | | (emacs_blocked_free, emacs_blocked_malloc, emacs_blocked_realloc) (reset_malloc_hooks, uninterrupt_malloc) [SYNC_INPUT]: Don't define.
* (Fgarbage_collect): Don't truncate_undo_list on dead buffers.Richard M. Stallman2005-01-021-1/+1
|
* Update comment for check_depth.Jan Djärv2004-12-251-12/+14
|
* * alloc.c (check_depth): New variable.Jan Djärv2004-12-251-4/+31
| | | | | | | | (overrun_check_malloc, overrun_check_realloc): Only add overhead and write check pattern if check_depth is 1 (to handle recursive calls). Increase/decrease check_depth in entry/exit. (overrun_check_free): Only check for overhead if check_depth is 1. Increase/decrease check_depth in entry/exit.
* (Fgarbage_collect): Update call to truncate_undo_list.Richard M. Stallman2004-12-211-67/+37
| | | | | | | Call that at the very start. (undo_limit, undo_strong_limit, undo_outer_limit): To undo.c. (syms_of_alloc): Don't define undo-limit, undo-strong-limit and undo-outer-limit here.
* * syssignal.h: Declare main_thread.Jan Djärv2004-12-151-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (SIGNAL_THREAD_CHECK): New macro. * keyboard.c (input_available_signal): Move thread checking code to macro SIGNAL_THREAD_CHECK and call that macro. (interrupt_signal): Call SIGNAL_THREAD_CHECK. * alloc.c (uninterrupt_malloc): Move main_thread to emacs.c. * emacs.c: Define main_thread. (main): Initialize main_thread. (handle_USR1_signal, handle_USR2_signal, fatal_error_signal) (memory_warning_signal): Call SIGNAL_THREAD_CHECK. * floatfns.c (float_error): Call SIGNAL_THREAD_CHECK. * dispnew.c (window_change_signal): Call SIGNAL_THREAD_CHECK. * sysdep.c (select_alarm): Call SIGNAL_THREAD_CHECK. * process.c (send_process_trap, sigchld_handler): Call SIGNAL_THREAD_CHECK. * data.c (arith_error): Call SIGNAL_THREAD_CHECK. * atimer.c (alarm_signal_handler): Call SIGNAL_THREAD_CHECK.
* * alloc.c: Add comment about the reason for (UN)BLOCK_INPUT_ALLOC.Jan Djärv2004-12-071-0/+17
|
* * gtkutil.c: Include signal.h and syssignal.h.Jan Djärv2004-12-071-6/+67
| | | | | | | | | | | | | | | | | | | | | | | (xg_get_file_name): Block and unblock __SIGRTMIN if defined. * alloc.c: If HAVE_GTK_AND_PTHREAD, include pthread.h, new variables main_thread and alloc_mutex, define (UN)BLOCK_INPUT_ALLOC to use alloc_mutex to protect emacs_blocked_* calls and only do (UN)BLOCK_INPUT in the main thread. If not HAVE_GTK_AND_PTHREAD, (UN)BLOCK_INPUT_ALLOC is the same as (UN)BLOCK_INPUT. (emacs_blocked_free, emacs_blocked_malloc) (emacs_blocked_realloc): Use (UN)BLOCK_INPUT_ALLOC. (uninterrupt_malloc): Initialize main_thread and alloc_mutex. (reset_malloc_hooks): New function. * lisp.h: Declare reset_malloc_hooks. * emacs.c (Fdump_emacs): Call reset_malloc_hooks. * keyboard.c: Conditionally include pthread.h (handle_async_inpu, input_available_signalt): If not in the main thread, block signal, send signal to main thread and return.
* Add commentary for last change.Kim F. Storm2004-12-011-23/+77
| | | | | | | | | | (XMALLOC_PUT_SIZE, XMALLOC_GET_SIZE): New macros to handle sizeof(size_t) != 4. (overrun_check_malloc, overrun_check_realloc, overrun_check_free): Use them. Also clear header and trailer of freed memory. (GC_STRING_OVERRUN_COOKIE_SIZE): Rename from GC_STRING_EXTRA. (string_overrun_cookie): Rename from string_overrun_pattern. (GC_STRING_EXTRA): Define from GC_STRING_OVERRUN_COOKIE_SIZE.
* Add more checks for buffer overruns.Kim F. Storm2004-11-301-9/+152
| | | | | | | | | | | | (XMALLOC_OVERRUN_CHECK_SIZE, xmalloc_overrun_check_header) xmalloc_overrun_check_trailer, overrun_check_malloc) overrun_check_realloc, overrun_check_free): Add. (GC_STRING_EXTRA, string_overrun_pattern): Add. (check_sblock, allocate_string_data, compact_small_strings): Set and check string_overrun_pattern if GC_CHECK_STRING_OVERRUN. (check_cons_list): Condition on GC_CHECK_CONS_LIST. (check_string_free_list): Add. (allocate_string, sweep_strings): Call check_string_free_list.
* (mark_stack): Call GC_MARK_SECONDARY_STACK if defined.Andreas Schwab2004-11-271-0/+5
|
* Comment change.Richard M. Stallman2004-09-181-2/+5
|
* (Fgarbage_collect): Mark keyboards, gtk data, and specpdlStefan Monnier2004-09-131-15/+16
| | | | before doing the mark_stack_check_gcpros since they are not on the stack.
* (check_cons_list): New function (contents commented out).Richard M. Stallman2004-07-251-0/+11
|
* (mark_object): Only look at Lisp_Misc_Save_Value if GC_MARK_STACK.Kim F. Storm2004-07-121-0/+2
|
* (allocate_misc): Update total_free_markers.Kim F. Storm2004-06-241-6/+17
| | | | | (free_misc): New function. (safe_alloca_unwind, free_marker): Use it.