[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tool-bar changes
From: |
Chong Yidong |
Subject: |
Re: Tool-bar changes |
Date: |
Wed, 14 May 2008 16:50:25 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
Here's my explanation for the bug:
Each time Emacs starts up, main() calls init_fns(), which sets
weak_hash_tables to NULL. This means that any weak hash tables that
were loaded into memory by temacs are orphaned, and can't be found by
sweep_weak_hash_tables.
So the solution is to make a new function, init_weak_hash_tables,
analogous to init_float etc., and call it from init_alloc_once. The
following patch accomplishes this. WDYT?
*** trunk/src/alloc.c.~1.439.~ 2008-05-14 12:41:02.000000000 -0400
--- trunk/src/alloc.c 2008-05-14 16:40:48.000000000 -0400
***************
*** 6247,6252 ****
--- 6247,6253 ----
init_marker ();
init_float ();
init_intervals ();
+ init_weak_hash_tables ();
#ifdef REL_ALLOC
malloc_hysteresis = 32;
*** trunk/src/fns.c.~1.443.~ 2008-05-14 12:41:03.000000000 -0400
--- trunk/src/fns.c 2008-05-14 16:42:02.000000000 -0400
***************
*** 4257,4262 ****
--- 4257,4268 ----
Weak Hash Tables
************************************************************************/
+ void
+ init_weak_hash_tables ()
+ {
+ weak_hash_tables = NULL;
+ }
+
/* Sweep weak hash table H. REMOVE_ENTRIES_P non-zero means remove
entries from the table that don't survive the current GC.
REMOVE_ENTRIES_P zero means mark entries that are in use. Value is
***************
*** 5284,5290 ****
void
init_fns ()
{
- weak_hash_tables = NULL;
}
/* arch-tag: 787f8219-5b74-46bd-8469-7e1cc475fa31
--- 5290,5295 ----
- Re: Tool-bar changes, (continued)
- Re: Tool-bar changes, Chong Yidong, 2008/05/13
- Re: Tool-bar changes, Stefan Monnier, 2008/05/13
- Re: Tool-bar changes, David Reitter, 2008/05/13
- Re: Tool-bar changes, Eli Zaretskii, 2008/05/13
- Re: Tool-bar changes, Chong Yidong, 2008/05/13
- Re: Tool-bar changes, Chong Yidong, 2008/05/14
- Re: Tool-bar changes, Stefan Monnier, 2008/05/14
- Re: Tool-bar changes, Chong Yidong, 2008/05/14
- Re: Tool-bar changes,
Chong Yidong <=
- Re: Tool-bar changes, Stefan Monnier, 2008/05/14
- Re: Next release, YAMAMOTO Mitsuharu, 2008/05/05
- Re: Next release, Chong Yidong, 2008/05/04
- Re: Next release, YAMAMOTO Mitsuharu, 2008/05/04
- Re: Next release, Dan Nicolaescu, 2008/05/03
- Re: Next release, Eli Zaretskii, 2008/05/04
- Re: Next release, Dan Nicolaescu, 2008/05/04
- Re: Next release, David Kastrup, 2008/05/04
- Re: Next release, Eli Zaretskii, 2008/05/04
- Re: Next release, Dan Nicolaescu, 2008/05/04