diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2004-09-13 21:06:31 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2004-09-13 21:06:31 +0000 |
commit | 126f9c02d40e06a1208c0d044c03d4471abde0b5 (patch) | |
tree | a8a35c8622e5136d72e95c6b9fd619e984cfe5ee /src | |
parent | c046590e94b77f9e69f2355595652517aca502dc (diff) | |
download | emacs-126f9c02d40e06a1208c0d044c03d4471abde0b5.tar.gz |
(Fgarbage_collect): Mark keyboards, gtk data, and specpdl
before doing the mark_stack_check_gcpros since they are not on the stack.
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 5 | ||||
-rw-r--r-- | src/alloc.c | 31 |
2 files changed, 21 insertions, 15 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 5fee1e8d97d..f0e8a696e52 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2004-09-13 Stefan Monnier <monnier@iro.umontreal.ca> + + * alloc.c (Fgarbage_collect): Mark keyboards, gtk data, and specpdl + before doing the mark_stack_check_gcpros since they are not on the stack. + 2004-09-12 Kim F. Storm <storm@cua.dk> * editfns.c (Fformat): Handle format strings with multiple text diff --git a/src/alloc.c b/src/alloc.c index ece150f083c..bf93e7fb7bf 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -1,6 +1,6 @@ /* Storage allocation and gc for GNU Emacs Lisp interpreter. - Copyright (C) 1985,86,88,93,94,95,97,98,1999,2000,01,02,03,2004 - Free Software Foundation, Inc. + Copyright (C) 1985, 1986, 1988, 1993, 1994, 1995, 1997, 1998, 1999, + 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -4454,6 +4454,20 @@ returns nil, because real GC can't be done. */) for (i = 0; i < staticidx; i++) mark_object (*staticvec[i]); + for (bind = specpdl; bind != specpdl_ptr; bind++) + { + mark_object (bind->symbol); + mark_object (bind->old_value); + } + mark_kboards (); + +#ifdef USE_GTK + { + extern void xg_mark_data (); + xg_mark_data (); + } +#endif + #if (GC_MARK_STACK == GC_MAKE_GCPROS_NOOPS \ || GC_MARK_STACK == GC_MARK_STACK_CHECK_GCPROS) mark_stack (); @@ -4467,11 +4481,6 @@ returns nil, because real GC can't be done. */) #endif mark_byte_stack (); - for (bind = specpdl; bind != specpdl_ptr; bind++) - { - mark_object (bind->symbol); - mark_object (bind->old_value); - } for (catch = catchlist; catch; catch = catch->next) { mark_object (catch->tag); @@ -4483,19 +4492,11 @@ returns nil, because real GC can't be done. */) mark_object (handler->var); } mark_backtrace (); - mark_kboards (); #if GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES mark_stack (); #endif -#ifdef USE_GTK - { - extern void xg_mark_data (); - xg_mark_data (); - } -#endif - /* Everything is now marked, except for the things that require special finalization, i.e. the undo_list. Look thru every buffer's undo list |