X-Git-Url: http://git.hcoop.net/bpt/emacs.git/blobdiff_plain/6f8a87c027ebd6f9cfdac5c0df97d651227bec62..b12f6e85a068462962d1bf012260e2b55aabd4e7:/src/alloc.c diff --git a/src/alloc.c b/src/alloc.c index 3497234234..8aea81a0f7 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -6,7 +6,7 @@ This file is part of GNU Emacs. GNU Emacs is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) +the Free Software Foundation; either version 3, or (at your option) any later version. GNU Emacs is distributed in the hope that it will be useful, @@ -266,7 +266,7 @@ Lisp_Object Vmemory_full; remapping on more recent systems because this is less important nowadays than in the days of small memories and timesharing. */ -EMACS_INT pure[PURESIZE / sizeof (EMACS_INT)] = {1,}; +EMACS_INT pure[(PURESIZE + sizeof (EMACS_INT) - 1) / sizeof (EMACS_INT)] = {1,}; #define PUREBEG (char *) pure #else /* HAVE_SHM */ @@ -341,7 +341,9 @@ Lisp_Object Vgc_elapsed; /* accumulated elapsed time in GC */ EMACS_INT gcs_done; /* accumulated GCs */ static void mark_buffer P_ ((Lisp_Object)); +extern void mark_terminals P_ ((void)); extern void mark_kboards P_ ((void)); +extern void mark_ttys P_ ((void)); extern void mark_backtrace P_ ((void)); static void gc_sweep P_ ((void)); static void mark_glyph_matrix P_ ((struct glyph_matrix *)); @@ -1234,7 +1236,8 @@ emacs_blocked_malloc (size, ptr) BLOCK_INPUT_ALLOC; __malloc_hook = old_malloc_hook; #ifdef DOUG_LEA_MALLOC - mallopt (M_TOP_PAD, malloc_hysteresis * 4096); + /* Segfaults on my system. --lorentey */ + /* mallopt (M_TOP_PAD, malloc_hysteresis * 4096); */ #else __malloc_extra_blocks = malloc_hysteresis; #endif @@ -5170,7 +5173,9 @@ returns nil, because real GC can't be done. */) mark_object (bind->symbol); mark_object (bind->old_value); } + mark_terminals (); mark_kboards (); + mark_ttys (); #ifdef USE_GTK { @@ -5605,6 +5610,7 @@ mark_object (arg) mark_object (ptr->menu_bar_vector); mark_object (ptr->buffer_predicate); mark_object (ptr->buffer_list); + mark_object (ptr->buried_buffer_list); mark_object (ptr->menu_bar_window); mark_object (ptr->tool_bar_window); mark_face_cache (ptr->face_cache);