1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-26 15:21:51 -08:00
Commit graph

332 commits

Author SHA1 Message Date
Andreas Schwab
41b867eace (Fpurecopy): Declare size as EMACS_INT to not lose bits. 2004-01-26 11:54:36 +00:00
Stefan Monnier
831b476c5a (lisp_malloc, lisp_align_malloc) [USE_LSB_TAG]:
Don't check range of malloc address.
(pure_alloc) [USE_LSB_TAG]: Enforce alignment.
2004-01-21 03:34:32 +00:00
Stefan Monnier
d05b383acd (struct interval_block, struct string_block)
(struct symbol_block, struct marker_block, live_string_p)
(live_cons_p, live_symbol_p, live_float_p, live_misc_p):
Better preserve alignment for objects in blocks.
(FLOAT_BLOCK_SIZE): Adjust for possible alignment padding.
2004-01-14 14:35:23 +00:00
Jan Djärv
de7515d6b8 * alloc.c (allocate_vectorlike): Surround calls to mallopt with
BLOCK/UNBLOCK_INPUT.
2004-01-11 21:50:12 +00:00
Stefan Monnier
a06681266b (make_float, Fcons): Clear the markbit at init time.
(make_float, Fcons, Fmake_symbol, allocate_misc): Move the increment
of block_index outside of the macro call.
(Fgarbage_collect): Remove null code.
2003-11-18 00:39:13 +00:00
Richard M. Stallman
4532fdde32 (lisp_align_malloc): If BASE is 0, call memory_full. 2003-10-13 18:45:03 +00:00
Dave Love
ad5f3636c5 (GC_MALLOC_CHECK): Move conditional undef after lisp.h. 2003-09-19 15:50:56 +00:00
Stefan Monnier
1aad248540 (init_marker): Remove debugging code. 2003-09-11 22:41:16 +00:00
Stefan Monnier
0930c1a1c8 (init_intervals, init_symbol, init_marker): Don't preallocate anything.
(Fgarbage_collect, mark_object): Ignore the markbit.
2003-09-11 22:22:11 +00:00
Andreas Schwab
03bb6a06e1 Use long instead of int when casting ABLOCKS_BUSY to
avoid warning.
2003-09-07 19:15:51 +00:00
Miles Bader
ab5796a9f9 Add arch taglines 2003-09-01 15:45:59 +00:00
Dave Love
d748931263 (lisp_align_malloc): Change type of `aligned'. 2003-08-20 16:46:33 +00:00
Gerd Moellmann
f4446bbf6f (lisp_align_malloc): Check for memory full when
allocating ablocks, which also avoids freeing a pointer into an
ablocks structure.
2003-08-19 12:58:35 +00:00
Andreas Schwab
f29181dc5d (mark_object): Handle Lisp_Misc_Save_Value. 2003-08-08 23:14:48 +00:00
Stefan Monnier
7cdee93615 (MARK_STRING, UNMARK_STRING, STRING_MARKED_P)
(GC_STRING_CHARS, string_bytes): Use ARRAY_MARK_FLAG rather than
MARKBIT as the gcmarkbit for strings.
2003-07-21 20:03:35 +00:00
Richard M. Stallman
e74154871e (syms_of_alloc): Doc fixes. 2003-07-21 09:50:53 +00:00
Stefan Monnier
08b7c2cbf3 Use bitmaps for cons cells, as was done for floats.
(init_float, init_cons): Let the normal code allocate the first block.
(CONS_BLOCK_SIZE): Redefine based on BLOCK_BYTES and bitmap size.
(CONS_BLOCK, CONS_INDEX, CONS_MARKED_P, CONS_MARK, CONS_UNMARK): New macros.
(struct cons_block): Move conses to the beginning.  Add gcmarkbits.
(Fcons): Use lisp_align_malloc and CONS_UNMARK.
(live_cons_p): Check the pointer is not past the `conses' array.
(mark_maybe_object, mark_maybe_pointer): Use CONS_MARKED_P.
(mark_object, mark_buffer): Use CONS_MARKED_P and CONS_MARK.
(survives_gc_p): Use CONS_MARKED_P and simplify.
(gc_sweep): Use CONS_MARKED_P, CONS_UNMARK, and lisp_align_free.
2003-07-15 19:19:59 +00:00
Paul Eggert
379b98b161 (pure, staticvec): Initialize these arrays to nonzero, so that they're
not put into BSS by that optimization.
2003-07-14 05:37:52 +00:00
Stefan Monnier
19bcad1f59 (BLOCK_PADDING): Rename from ABLOCKS_PADDING. Update users.
(lisp_align_malloc): Use posix_memalign is available.
(ABLOCKS_BASE): Use HAVE_POSIX_MEMALIGN as an optimization.
(STRING_BLOCK_SIZE): Rename from STRINGS_IN_STRING_BLOCK for consistency.
Update users.
2003-07-14 02:51:08 +00:00
Stefan Monnier
f54253ec86 (mark_object): Mark the new `next' field of overlays.
(mark_buffer): Manually mark the overlays_(after|before) fields.
2003-07-09 14:53:41 +00:00
Richard M. Stallman
e1e375966e (Fgarbage_collect): Doc fix. 2003-07-07 20:39:40 +00:00
Stefan Monnier
bfe1a3f79b (live_float_p): Check that p is not past the `floats' array,
now that `floats' is not the last element of the struct any more.
2003-07-06 23:13:20 +00:00
Stefan Monnier
49723c0471 (mark_object): Change arg to only take Lisp_Object rather than *Lisp_Object.
(last_marked): Change accordingly.
(mark_interval, mark_maybe_object, mark_maybe_pointer)
(Fgarbage_collect, mark_glyph_matrix, mark_face_cache, mark_image)
(mark_buffer): Update calls to mark_object.
2003-07-06 19:35:58 +00:00
Jason Rumney
ebb8d41053 (struct ablock): Only include padding when there is some. 2003-07-06 14:55:00 +00:00
Stefan Monnier
ab6780cd2f (ALIGN): Add casts to simplify usage.
(BLOCK_ALIGN, BLOCK_BYTES, ABLOCKS_PADDING, ABLOCKS_SIZE)
(ABLOCKS_BYTES, ABLOCK_ABASE, ABLOCKS_BUSY, ABLOCKS_BASE): New macros.
(struct ablock, struct ablocks): New types.
(free_ablock): New global var.
(lisp_align_malloc, lisp_align_free): New functions.
(FLOAT_BLOCK_SIZE): Redefine in terms of BLOCK_BYTES.
(struct float_block): Reorder and add gcmarkbits.
(GETMARKBIT, SETMARKBIT, UNSETMARKBIT, FLOAT_BLOCK, FLOAT_INDEX)
(FLOAT_MARKED_P, FLOAT_MARK, FLOAT_UNMARK): New macros.
(init_float, make_float): Use lisp_align_malloc.
(free_float, live_float_p): Don't use `type' any more.
(make_float): Use FLOAT_UNMARK to access to mark bit.
(mark_maybe_object, mark_maybe_pointer, survives_gc_p):
Use FLOAT_MARKED_P to access the mark bit.
(pure_alloc): Simplify use of ALIGN.
(mark_object): Use FLOAT_MARK to access the mark bit.
(gc_sweep): Use new macros to access the float's mark bit.
(init_alloc_once): Init free_ablock.
2003-07-04 20:19:06 +00:00
Stefan Monnier
349bd9eda2 (mark_buffer): Fix missed buffer->name in last patch. 2003-06-27 22:54:26 +00:00
Stefan Monnier
3ef06d12cd (VECTOR_MARK, VECTOR_UNMARK, VECTOR_MARKED_P): New macros.
(GC_STRING_BYTES): Don't mask markbit (it's only used on `size').
(allocate_buffer): Move.
(string_bytes): Don't mask markbit of `size_byte'.
(mark_maybe_object, mark_maybe_pointer, Fgarbage_collect)
(mark_object, mark_buffer, survives_gc_p, gc_sweep):
Use the `size' field of buffers (rather than the `name' field) for
the mark bit, as is done for all other vectorlike objects.
Use the new macros to access the mark bit of vectorlike objects.
2003-06-27 21:54:38 +00:00
Stefan Monnier
ef89c2ce88 (survives_gc_p): Simplify.
(Fmake_marker, free_marker, gc_sweep): Update for new types.
2003-06-26 23:16:05 +00:00
Stefan Monnier
2336fe58df (make_interval, Fmake_symbol, allocate_misc):
Initialize the new field `gcmarkbit'.
(mark_interval, MARK_INTERVAL_TREE): Use the new `gcmarkbit' field.
(mark_interval_tree): Don't mark the tree separately from the nodes.
(UNMARK_BALANCE_INTERVALS): Don't unmark the tree.
(mark_maybe_object, mark_maybe_pointer, Fgarbage_collect, mark_object)
(survives_gc_p, gc_sweep): Use new `gcmarkbit' fields.
2003-06-25 23:28:14 +00:00
Stefan Monnier
6793bc6322 (mark_kboards): Move to keyboard.c. 2003-06-15 21:49:23 +00:00
Dave Love
d36b182f57 Comment. 2003-05-29 18:36:16 +00:00
Andreas Schwab
d22be14d73 (Fgarbage_collect): Fix last change. 2003-05-26 22:03:17 +00:00
Stefan Monnier
acf5f7d34e (Fgarbage_collect): Remove `unused var tail' warning. 2003-05-25 17:40:03 +00:00
Richard M. Stallman
fa42e88f9b (Fgarbage_collect): Cast pointers into specpdl to avoid GCC warning. 2003-05-17 12:40:32 +00:00
Richard M. Stallman
3de0effb43 (abort_on_gc): New variable.
(Fgarbage_collect): Abort if abort_on_gc is set.
2003-04-30 12:04:39 +00:00
Stefan Monnier
92cc28b2f8 (Fmake_byte_code): Improve the `usage' string. 2003-04-17 21:49:09 +00:00
Richard M. Stallman
918a23a7d9 (VALIDATE_LISP_STORAGE): Macro deleted. All calls deleted.
(lisp_malloc): Do the work here directly.
2003-04-06 20:27:19 +00:00
Kenichi Handa
fcbb914bcd (make_string_from_bytes): Add `const' for the arg
CONTENTS.
(make_specified_string): Likewise.
2003-03-23 02:07:13 +00:00
Kenichi Handa
229b28c432 (make_specified_string): Fix previous change. 2003-03-19 12:24:43 +00:00
Stefan Monnier
69ab9f854e (Fgarbage_collect): Don't use XSETFLOAT. 2003-02-22 22:15:31 +00:00
Juanma Barranquero
177c0ea743 Trailing whitespace deleted. 2003-02-04 14:56:31 +00:00
Dave Love
2c5bd60800 (Vgc_elapsed, gcs_done): New variables.
(Fgarbage_collect): Use them.
(init_alloc, syms_of_alloc): Set them up.
2003-01-30 14:15:58 +00:00
Dave Love
422eec7eb8 (mark_stack) [!GC_LISP_OBJECT_ALIGNMENT && __GNUC__]:
Use __alignof__.
2003-01-24 12:24:33 +00:00
Dave Love
83fc9c63ea (Fgc_status): Print zombie list.
(mark_maybe_object) [GC_MARK_STACK==GC_USE_GCPROS_CHECK_ZOMBIES]:
Fix assignment of zombies.
(Fgarbage_collect) [GC_MARK_STACK==GC_USE_GCPROS_CHECK_ZOMBIES]:
Don't take car of non-cons.
2003-01-21 16:56:38 +00:00
Jan Djärv
488dd4c404 GTK version 2003-01-19 21:50:03 +00:00
Kim F. Storm
441174202f (pure_alloc): Rewritten and simplified. 2003-01-12 15:40:23 +00:00
Kim F. Storm
035261dccc (pure_alloc): Corrected last change; now align the
pointer and adjust the size rather than aligning the size and
adjusting the pointer.  Use a goto to handle overflow exception.
2003-01-12 00:40:09 +00:00
Andreas Schwab
3a8d08994a (pure_alloc): Correct alignment for Lisp_Floats. 2003-01-10 20:08:54 +00:00
Richard M. Stallman
42172a6ba0 (make_save_value): New function. 2003-01-06 00:45:45 +00:00
Richard M. Stallman
9f7d921018 Comment change. 2002-12-21 17:59:27 +00:00