From: Stefan Monnier Date: Thu, 11 Sep 2003 22:22:11 +0000 (+0000) Subject: (init_intervals, init_symbol, init_marker): Don't preallocate anything. X-Git-Tag: ttn-vms-21-2-B4~8865 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0930c1a1c8ac9398e71fd8e9ed7efb93dc41125f;p=emacs.git (init_intervals, init_symbol, init_marker): Don't preallocate anything. (Fgarbage_collect, mark_object): Ignore the markbit. --- diff --git a/src/ChangeLog b/src/ChangeLog index 53bfee81eed..380d0d208f6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2003-09-11 Stefan Monnier + + * alloc.c (init_intervals, init_symbol, init_marker): + Don't preallocate anything. + (Fgarbage_collect, mark_object): Ignore the markbit. + + * bytecode.c (mark_byte_stack, unmark_byte_stack): Ignore the markbit. + 2003-09-08 Lute Kamstra * xdisp.c (pint2hrstr): New function. @@ -12,8 +20,7 @@ 2003-09-07 Eli Zaretskii - * editfns.c (region_limit): Support any non-zero value of - BEGINNINGP. + * editfns.c (region_limit): Support any non-zero value of BEGINNINGP. 2003-09-03 Kim F. Storm @@ -54,9 +61,9 @@ 2003-08-29 Gerd Moellmann - * xdisp.c (redisplay_internal): Fix change of 2003-04-30. Don't - tell redisplay display is accurate when it's actually been paused - for pending input. + * xdisp.c (redisplay_internal): Fix change of 2003-04-30. + Don't tell redisplay display is accurate when it's actually been + paused for pending input. 2003-08-29 Richard M. Stallman @@ -65,7 +72,7 @@ * data.c (Fmake_variable_buffer_local, Fmake_local_variable) (Fkill_local_variable, Fmake_variable_frame_local) - (Flocal_variable_p, Flocal_variable_if_set_p): + (Flocal_variable_p, Flocal_variable_if_set_p): Use indirect_variable to trace thru variable aliases. * config.in: Updated. @@ -82,7 +89,7 @@ 2003-08-28 David Abrahams (tiny change) - * coding.c (decode_coding_iso2022): Initialized local variable c2. + * coding.c (decode_coding_iso2022): Initialize local variable c2. (decode_coding_sjis_big5): Likewise. 2003-08-27 Jason Rumney @@ -100,13 +107,11 @@ 2003-08-24 Eli Zaretskii - * term.c (term_init): Remove `const' from buffer_size's - declaration. + * term.c (term_init): Remove `const' from buffer_size's declaration. * Makefile.in (msdos.o): Depend on intervals.h. - * msdos.c: Include intervals.h, since STRING_INTERVALS requires - that. + * msdos.c: Include intervals.h, since STRING_INTERVALS requires that. 2003-08-21 Jan Dj,Ad(Brv @@ -146,7 +151,7 @@ (xmalloc, xfree): Declare. (malloc): Don't declare. - * Makefile.in (LWLIB_OPTIONS): Removed (unused). + * Makefile.in (LWLIB_OPTIONS): Remove (unused). (alloca.o): Remove obsolete stuff concerning alloca.s. Depend on atimer.h, blockinput.h. @@ -175,8 +180,7 @@ * puresize.h (BASE_PURESIZE): Increase to 1100000. - * buffer.c (Fmove_overlay): Set overlay's next pointer - unconditionally. + * buffer.c (Fmove_overlay): Set overlay's next pointer unconditionally. 2003-08-16 Richard M. Stallman @@ -190,7 +194,7 @@ 2003-08-16 Juri Linkov (tiny change) * syntax.c (Fforward_word): Argument changed to optional. - Set default value to 1. + Set default value to 1. 2003-08-15 Kenichi Handa @@ -248,8 +252,7 @@ 2003-07-28 KOBAYASHI Yasuhiro (tiny change) - * xfns.c (xic_set_preeditarea): Add the left fringe width to - spot.x. + * xfns.c (xic_set_preeditarea): Add the left fringe width to spot.x. 2003-07-22 Stefan Monnier diff --git a/src/alloc.c b/src/alloc.c index 332e63c4fd2..2c63c1cd07e 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -1131,14 +1131,10 @@ int n_interval_blocks; static void init_intervals () { - interval_block - = (struct interval_block *) lisp_malloc (sizeof *interval_block, - MEM_TYPE_NON_LISP); - interval_block->next = 0; - bzero ((char *) interval_block->intervals, sizeof interval_block->intervals); - interval_block_index = 0; + interval_block = NULL; + interval_block_index = INTERVAL_BLOCK_SIZE; interval_free_list = 0; - n_interval_blocks = 1; + n_interval_blocks = 0; } @@ -2768,13 +2764,10 @@ int n_symbol_blocks; void init_symbol () { - symbol_block = (struct symbol_block *) lisp_malloc (sizeof *symbol_block, - MEM_TYPE_SYMBOL); - symbol_block->next = 0; - bzero ((char *) symbol_block->symbols, sizeof symbol_block->symbols); - symbol_block_index = 0; + symbol_block = NULL; + symbol_block_index = SYMBOL_BLOCK_SIZE; symbol_free_list = 0; - n_symbol_blocks = 1; + n_symbol_blocks = 0; } @@ -2854,13 +2847,11 @@ int n_marker_blocks; void init_marker () { - marker_block = (struct marker_block *) lisp_malloc (sizeof *marker_block, - MEM_TYPE_MISC); - marker_block->next = 0; - bzero ((char *) marker_block->markers, sizeof marker_block->markers); - marker_block_index = 0; + marker_block = NULL; + marker_block_index = MARKER_BLOCK_SIZE; marker_free_list = 0; - n_marker_blocks = 1; + n_marker_blocks = 0; + fprintf(stderr, "union Lisp_Misc = %d\n", sizeof (union Lisp_Misc)); } /* Return a newly allocated Lisp_Misc object, with no substructure. */ @@ -4395,12 +4386,7 @@ returns nil, because real GC can't be done. */) /* clear_marks (); */ - /* Mark all the special slots that serve as the roots of accessibility. - - Usually the special slots to mark are contained in particular structures. - Then we know no slot is marked twice because the structures don't overlap. - In some cases, the structures point to the slots to be marked. - For these, we use MARKBIT to avoid double marking of the slot. */ + /* Mark all the special slots that serve as the roots of accessibility. */ for (i = 0; i < staticidx; i++) mark_object (*staticvec[i]); @@ -4413,11 +4399,7 @@ returns nil, because real GC can't be done. */) register struct gcpro *tail; for (tail = gcprolist; tail; tail = tail->next) for (i = 0; i < tail->nvars; i++) - if (!XMARKBIT (tail->var[i])) - { - mark_object (tail->var[i]); - XMARK (tail->var[i]); - } + mark_object (tail->var[i]); } #endif @@ -4439,21 +4421,14 @@ returns nil, because real GC can't be done. */) } for (backlist = backtrace_list; backlist; backlist = backlist->next) { - if (!XMARKBIT (*backlist->function)) - { - mark_object (*backlist->function); - XMARK (*backlist->function); - } + mark_object (*backlist->function); + if (backlist->nargs == UNEVALLED || backlist->nargs == MANY) i = 0; else i = backlist->nargs - 1; for (; i >= 0; i--) - if (!XMARKBIT (backlist->args[i])) - { - mark_object (backlist->args[i]); - XMARK (backlist->args[i]); - } + mark_object (backlist->args[i]); } mark_kboards (); @@ -4519,24 +4494,10 @@ returns nil, because real GC can't be done. */) || GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES) { register struct gcpro *tail; - - for (tail = gcprolist; tail; tail = tail->next) - for (i = 0; i < tail->nvars; i++) - XUNMARK (tail->var[i]); } #endif unmark_byte_stack (); - for (backlist = backtrace_list; backlist; backlist = backlist->next) - { - XUNMARK (*backlist->function); - if (backlist->nargs == UNEVALLED || backlist->nargs == MANY) - i = 0; - else - i = backlist->nargs - 1; - for (; i >= 0; i--) - XUNMARK (backlist->args[i]); - } VECTOR_UNMARK (&buffer_defaults); VECTOR_UNMARK (&buffer_local_symbols); @@ -4721,7 +4682,6 @@ mark_object (arg) int cdr_count = 0; loop: - XUNMARK (obj); if (PURE_POINTER_P (XPNTR (obj))) return;