1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-25 06:50:46 -08:00
Commit graph

414 commits

Author SHA1 Message Date
YAMAMOTO Mitsuharu
a1b41389e4 [!SYSTEM_MALLOC && !SYNC_INPUT] (uninterrupt_malloc)
[HAVE_GTK_AND_PTHREAD && !DOUG_LEA_MALLOC]: Don't use recursive mutex.
2008-04-12 01:59:22 +00:00
Glenn Morris
8cabe764e9 Add 2008 to copyright years. 2008-01-08 04:37:27 +00:00
Andreas Schwab
480ecb6b5c (reset_malloc_hooks): Set the hooks to the previous
values instead of zapping them.
2007-09-16 09:40:45 +00:00
Andreas Schwab
259d15166e (pure): Round PURESIZE up. 2007-08-19 00:17:53 +00:00
Glenn Morris
684d6f5bcc Switch license to GPLv3 or later. 2007-07-25 05:19:07 +00:00
YAMAMOTO Mitsuharu
add3c3eac4 (mem_insert): Set min_heap_address and max_heap_address
if they are not yet initialized.
2007-04-16 03:09:50 +00:00
YAMAMOTO Mitsuharu
86302e37c3 (BLOCK_INPUT_ALLOC, UNBLOCK_INPUT_ALLOC): Use
BLOCK_INPUT/UNBLOCK_INPUT.
2007-01-26 08:35:54 +00:00
Glenn Morris
4e6835dbc4 Add 2007 to copyright years. 2007-01-21 04:57:37 +00:00
Jan Djärv
959dc6015a (BLOCK_INPUT_ALLOC, UNBLOCK_INPUT_ALLOC): Use pthread_equal,
block/unblock SIGIO.
2007-01-11 19:22:04 +00:00
YAMAMOTO Mitsuharu
55a314a5c2 (mark_memory): New argument OFFSET. All uses changed.
Fix address calculations for case END < START.
(mark_stack): Impose Lisp_Object alignment on jmp_buf.
2006-11-13 08:20:48 +00:00
YAMAMOTO Mitsuharu
f3c4a0e1d2 (BLOCK_INPUT_ALLOC, UNBLOCK_INPUT_ALLOC): Undo previous
change.  Move mutex lock/unlock operations inside BLOCK_INPUT.
2006-08-27 07:08:31 +00:00
Jan Djärv
0d3e774694 * alloc.c (UNBLOCK_INPUT_ALLOC, BLOCK_INPUT_ALLOC): Use in_sighandler
to check if mutex should be locked or not.
2006-08-10 06:09:30 +00:00
Eli Zaretskii
f892cf9c9d Include w32.h.
(valid_lisp_object_p) [WINDOWSNT]: Call w32_valid_pointer_p to do the job.
2006-08-05 13:01:50 +00:00
Eli Zaretskii
69666f776a [WINDOWSNT]: Include fcntl.h, to fix last change. 2006-07-29 10:18:48 +00:00
Richard M. Stallman
69b9efaa09 Whitespace change. 2006-07-29 01:53:31 +00:00
Kim F. Storm
7ffb6955ce (valid_pointer_p): New function (from valid_lisp_object_p).
(valid_lisp_object_p): Use it to check for valid SUBRP obj.
2006-07-28 11:12:23 +00:00
YAMAMOTO Mitsuharu
79fd0489dd (find_string_data_in_pure): New function.
(make_pure_string): Use it to reuse existing string data if possible.
2006-07-25 10:10:19 +00:00
YAMAMOTO Mitsuharu
e5bc14d4b6 (pure_bytes_used_lisp, pure_bytes_used_non_lisp): New vars.
(init_alloc_once): Initialize them.
(pure_alloc): Allocate non-Lisp objects from the end of pure storage
without alignment.
2006-07-20 01:01:04 +00:00
Kim F. Storm
9b306d3759 (buffer_memory_full, memory_full): Use xsignal. Remove loop.
(list1): New function.
2006-07-18 13:25:40 +00:00
Eli Zaretskii
4f27350a99 [STDC_HEADERS]: Include stddef.h. 2006-04-08 16:44:27 +00:00
Stefan Monnier
6bfd98e75d * process.h (struct Lisp_Process): Replace Lisp_Objects `pid',
`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.
2006-04-08 15:07:35 +00:00
Kim F. Storm
b4181b015a (USE_POSIX_MEMALIGN): Fix last change. 2006-03-10 08:10:24 +00:00
Stefan Monnier
349a450079 (USE_POSIX_MEMALIGN): New macro.
(ABLOCKS_BASE, lisp_align_malloc, lisp_align_free): Use it.
2006-03-09 23:06:58 +00:00
Stefan Monnier
537407f049 (Fmake_symbol): Comment-out left-over assert from before we added BLOCK_INPUTs. 2006-02-17 16:00:35 +00:00
Juanma Barranquero
909e3b3323 (Fmake_bool_vector, Fpurecopy): Doc fixes. 2006-02-09 10:49:59 +00:00
Chong Yidong
e2984df0ef * alloc.c (make_interval, allocate_string)
(allocate_string_data, make_float, Fcons, allocate_vectorlike)
	(Fmake_symbol, allocate_misc): Use BLOCK_INPUT when accessing
	global variables.
2006-01-27 22:14:57 +00:00
Richard M. Stallman
2aee5ca377 (check_pure_size): Make overflow message an "error message". 2006-01-26 17:51:42 +00:00
Chong Yidong
a0b08700d1 * alloc.c (allocate_string_data): Update next_free immediately, to
reduce risk of memory clobberage.
2006-01-24 18:35:25 +00:00
Stefan Monnier
cfb2f32e41 (lisp_align_free): Add an assertion.
(make_interval, allocate_string, make_float, allocate_misc, Fmake_symbol
(Fcons): If ENABLE_CHECKING is on, check we're not called from a sighandler.
2006-01-23 02:35:36 +00:00
Richard M. Stallman
7c0ab7d9e4 Comment and whitespace changes. 2005-12-11 05:07:16 +00:00
Kim F. Storm
de7124a7bd Include fcntl.h. Define O_WRONLY if not defined.
(valid_lisp_object_p) [!GC_MARK_STACK]: Validate pointer by
passing it to `emacs_write'.
2005-11-30 00:04:51 +00:00
Andreas Schwab
28a099a4aa (free_float): Make free list chaining aliasing-safe.
(make_float): Likewise.
(free_cons): Likewise.
(Fcons): Likewise.
(check_cons_list): Likewise.
(Fmake_symbol): Likewise.
(allocate_misc): Likewise.
(free_misc): Likewise.
(gc_sweep): Likewise.
2005-11-15 13:53:45 +00:00
Kim F. Storm
3cd5573537 (valid_lisp_object_p): New function to validate that
an object is really a valid Lisp_Object.
2005-11-09 23:14:12 +00:00
Richard M. Stallman
225ccad65e (refill_memory_reserve): Move decl out of conditionals. 2005-11-03 21:11:20 +00:00
Richard M. Stallman
4d74a5fc8e (BYTES_USED): Use uordblks, not arena.
(bytes_used_when_reconsidered): New variable.
(emacs_blocked_free): Set that.
2005-10-30 07:36:35 +00:00
Chong Yidong
bccfb31031 * alloc.c (emacs_blocked_free): Fix typo. 2005-10-29 20:17:48 +00:00
Richard M. Stallman
24d8a105d8 (syms_of_alloc) <memory-full>: Doc fix.
(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.
2005-10-29 19:39:50 +00:00
Richard M. Stallman
745575ff14 (spare_memory): No longer static.
(xfree) [!SYSTEM_MALLOC]: Call refill_memory_reserve.
2005-10-28 16:25:37 +00:00
Richard M. Stallman
49efed3a0f (refill_memory_reserve): Conditionalize the body, not the function's existence. 2005-10-04 20:26:13 +00:00
Dan Nicolaescu
fa8459a34e * image.c (slurp_file, xbm_read_bitmap_data): Cast to the correct
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.
2005-09-30 22:38:16 +00:00
Richard M. Stallman
974aae61bb (gc_cons_threshold): Not static.
(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.
2005-07-23 19:08:06 +00:00
Stefan Monnier
aa37e9e246 (gc_cons_threshold): Make it static. 2005-07-13 05:33:34 +00:00
Stefan Monnier
96f077ad71 (gc_cons_combined_threshold, Vgc_cons_percentage): New vars.
(Fgarbage_collect, init_alloc_once): Set gc_cons_combined_threshold.
(syms_of_alloc): Declare gc-cons-percentage.
2005-07-13 05:28:37 +00:00
Lute Kamstra
4fc5845fe8 Update FSF's address. 2005-07-04 16:49:24 +00:00
Juanma Barranquero
8349069cda Fix typo in comment. 2005-05-24 15:34:09 +00:00
Richard M. Stallman
8a4c9dc44e (Fmemory_full_p): New function.
(syms_of_alloc): defsubr it.
2005-05-14 14:07:03 +00:00
Kenichi Handa
2a7a8e99f2 (make_sub_char_table): Argument changed to initial
value of the slots.
2005-04-20 07:50:08 +00:00
Kim F. Storm
bbc012e0c3 (Fgarbage_collect): Call CHECK_CONS_LIST before and after gc. 2005-04-03 22:27:05 +00:00
Jan Djärv
1673df2e0d * alloc.c (allocate_string_data): Call BLOCK_INPUT before calling
mallopt.

* ralloc.c (r_alloc_init): Ditto.
2005-04-02 12:05:38 +00:00
Stefan Monnier
217604dab1 (make_number): The arg can be bigger than `int'. 2005-03-24 19:51:13 +00:00