diff options
| author | Stefan Monnier | 2004-09-13 21:06:31 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2004-09-13 21:06:31 +0000 |
| commit | 126f9c02d40e06a1208c0d044c03d4471abde0b5 (patch) | |
| tree | a8a35c8622e5136d72e95c6b9fd619e984cfe5ee /src/alloc.c | |
| parent | c046590e94b77f9e69f2355595652517aca502dc (diff) | |
| download | emacs-126f9c02d40e06a1208c0d044c03d4471abde0b5.tar.gz emacs-126f9c02d40e06a1208c0d044c03d4471abde0b5.zip | |
(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/alloc.c')
| -rw-r--r-- | src/alloc.c | 31 |
1 files changed, 16 insertions, 15 deletions
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 @@ | |||
| 1 | /* Storage allocation and gc for GNU Emacs Lisp interpreter. | 1 | /* Storage allocation and gc for GNU Emacs Lisp interpreter. |
| 2 | Copyright (C) 1985,86,88,93,94,95,97,98,1999,2000,01,02,03,2004 | 2 | Copyright (C) 1985, 1986, 1988, 1993, 1994, 1995, 1997, 1998, 1999, |
| 3 | Free Software Foundation, Inc. | 3 | 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -4454,6 +4454,20 @@ returns nil, because real GC can't be done. */) | |||
| 4454 | for (i = 0; i < staticidx; i++) | 4454 | for (i = 0; i < staticidx; i++) |
| 4455 | mark_object (*staticvec[i]); | 4455 | mark_object (*staticvec[i]); |
| 4456 | 4456 | ||
| 4457 | for (bind = specpdl; bind != specpdl_ptr; bind++) | ||
| 4458 | { | ||
| 4459 | mark_object (bind->symbol); | ||
| 4460 | mark_object (bind->old_value); | ||
| 4461 | } | ||
| 4462 | mark_kboards (); | ||
| 4463 | |||
| 4464 | #ifdef USE_GTK | ||
| 4465 | { | ||
| 4466 | extern void xg_mark_data (); | ||
| 4467 | xg_mark_data (); | ||
| 4468 | } | ||
| 4469 | #endif | ||
| 4470 | |||
| 4457 | #if (GC_MARK_STACK == GC_MAKE_GCPROS_NOOPS \ | 4471 | #if (GC_MARK_STACK == GC_MAKE_GCPROS_NOOPS \ |
| 4458 | || GC_MARK_STACK == GC_MARK_STACK_CHECK_GCPROS) | 4472 | || GC_MARK_STACK == GC_MARK_STACK_CHECK_GCPROS) |
| 4459 | mark_stack (); | 4473 | mark_stack (); |
| @@ -4467,11 +4481,6 @@ returns nil, because real GC can't be done. */) | |||
| 4467 | #endif | 4481 | #endif |
| 4468 | 4482 | ||
| 4469 | mark_byte_stack (); | 4483 | mark_byte_stack (); |
| 4470 | for (bind = specpdl; bind != specpdl_ptr; bind++) | ||
| 4471 | { | ||
| 4472 | mark_object (bind->symbol); | ||
| 4473 | mark_object (bind->old_value); | ||
| 4474 | } | ||
| 4475 | for (catch = catchlist; catch; catch = catch->next) | 4484 | for (catch = catchlist; catch; catch = catch->next) |
| 4476 | { | 4485 | { |
| 4477 | mark_object (catch->tag); | 4486 | mark_object (catch->tag); |
| @@ -4483,19 +4492,11 @@ returns nil, because real GC can't be done. */) | |||
| 4483 | mark_object (handler->var); | 4492 | mark_object (handler->var); |
| 4484 | } | 4493 | } |
| 4485 | mark_backtrace (); | 4494 | mark_backtrace (); |
| 4486 | mark_kboards (); | ||
| 4487 | 4495 | ||
| 4488 | #if GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES | 4496 | #if GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES |
| 4489 | mark_stack (); | 4497 | mark_stack (); |
| 4490 | #endif | 4498 | #endif |
| 4491 | 4499 | ||
| 4492 | #ifdef USE_GTK | ||
| 4493 | { | ||
| 4494 | extern void xg_mark_data (); | ||
| 4495 | xg_mark_data (); | ||
| 4496 | } | ||
| 4497 | #endif | ||
| 4498 | |||
| 4499 | /* Everything is now marked, except for the things that require special | 4500 | /* Everything is now marked, except for the things that require special |
| 4500 | finalization, i.e. the undo_list. | 4501 | finalization, i.e. the undo_list. |
| 4501 | Look thru every buffer's undo list | 4502 | Look thru every buffer's undo list |