From: Chong Yidong <cyd@stupidchicken.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: Tool-bar changes
Date: Wed, 14 May 2008 16:50:25 -0400 [thread overview]
Message-ID: <87r6c4sj8u.fsf@stupidchicken.com> (raw)
In-Reply-To: <87lk2cisyd.fsf@stupidchicken.com> (Chong Yidong's message of "Wed, 14 May 2008 15:30:50 -0400")
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 ----
next prev parent reply other threads:[~2008-05-14 20:50 UTC|newest]
Thread overview: 110+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-01 9:48 Next release Nick Roberts
2008-05-01 10:32 ` Jason Rumney
2008-05-01 23:07 ` Nick Roberts
2008-05-02 0:04 ` Jason Rumney
2008-05-01 17:43 ` Glenn Morris
2008-05-01 19:52 ` David Kastrup
2008-05-01 20:30 ` Chong Yidong
2008-05-02 1:00 ` Glenn Morris
2008-05-02 6:48 ` CHENG Gao
2008-05-03 1:00 ` Bob
2008-05-03 8:09 ` Richard M Stallman
2008-05-03 9:22 ` CHENG Gao
2008-05-03 9:49 ` YAMAMOTO Mitsuharu
2008-05-03 18:59 ` Stefan Monnier
2008-05-03 19:08 ` Glenn Morris
2008-05-03 21:42 ` Stefan Monnier
2008-05-04 9:37 ` Richard M Stallman
2008-05-04 9:37 ` Richard M Stallman
2008-05-06 0:38 ` YAMAMOTO Mitsuharu
2008-05-23 20:18 ` Problems preloading x-win.el (was: Next release) Stefan Monnier
2008-05-23 21:54 ` Dan Nicolaescu
2008-05-24 2:22 ` Problems preloading x-win.el Stefan Monnier
2008-05-24 3:19 ` Problems preloading x-win.el (was: Next release) YAMAMOTO Mitsuharu
2008-05-02 13:31 ` Next release Dan Nicolaescu
2008-05-02 13:52 ` Jason Rumney
2008-05-02 15:24 ` YAMAMOTO Mitsuharu
2008-05-02 16:10 ` Dan Nicolaescu
2008-05-03 9:38 ` YAMAMOTO Mitsuharu
2008-05-03 19:05 ` Stefan Monnier
2008-05-04 0:56 ` Dan Nicolaescu
2008-05-04 1:25 ` YAMAMOTO Mitsuharu
2008-05-04 1:40 ` Stefan Monnier
2008-05-04 1:57 ` YAMAMOTO Mitsuharu
2008-05-04 3:21 ` Stefan Monnier
2008-05-04 5:07 ` YAMAMOTO Mitsuharu
2008-05-04 15:52 ` Stefan Monnier
2008-05-05 1:28 ` YAMAMOTO Mitsuharu
2008-05-05 5:48 ` Stefan Monnier
2008-05-04 21:35 ` Chong Yidong
2008-05-04 23:52 ` YAMAMOTO Mitsuharu
2008-05-05 0:56 ` Stefan Monnier
2008-05-05 7:43 ` Juanma Barranquero
2008-05-07 18:28 ` Stefan Monnier
2008-05-07 19:13 ` Eli Zaretskii
2008-05-08 1:26 ` Stefan Monnier
2008-05-08 8:22 ` Jason Rumney
2008-05-08 8:32 ` David Kastrup
2008-05-08 9:04 ` David Reitter
2008-05-08 10:40 ` Jan Djärv
2008-05-08 10:55 ` Miles Bader
2008-05-10 8:55 ` Richard M Stallman
2008-05-10 20:30 ` David Kastrup
2008-05-10 23:53 ` David Reitter
2008-05-08 9:06 ` Miles Bader
2008-05-08 9:22 ` Jason Rumney
2008-05-08 9:35 ` Miles Bader
2008-05-08 9:44 ` David Kastrup
2008-05-08 19:47 ` Stephen J. Turnbull
2008-05-08 20:56 ` David Kastrup
2008-05-09 0:52 ` Stefan Monnier
2008-05-09 1:04 ` Miles Bader
2008-05-09 6:07 ` Tassilo Horn
2008-05-09 7:02 ` Eli Zaretskii
2008-05-08 9:51 ` Jason Rumney
2008-05-08 10:08 ` David Kastrup
2008-05-08 10:16 ` Eli Zaretskii
2008-05-08 10:36 ` David Kastrup
2008-05-09 23:54 ` Juri Linkov
2008-05-08 9:45 ` David Kastrup
2008-05-08 10:04 ` Eli Zaretskii
2008-05-08 13:51 ` Stefan Monnier
2008-05-08 13:57 ` Juanma Barranquero
2008-05-08 14:50 ` Miles Bader
2008-05-09 11:12 ` Richard M Stallman
2008-05-08 9:32 ` Eli Zaretskii
2008-05-08 13:46 ` Stefan Monnier
2008-05-08 2:34 ` Juanma Barranquero
2008-05-09 1:35 ` Tool-bar changes (Was: Next release) Chong Yidong
2008-05-09 3:25 ` Tool-bar changes Stefan Monnier
2008-05-09 5:53 ` Tassilo Horn
2008-05-13 18:07 ` Chong Yidong
2008-05-13 18:19 ` Stefan Monnier
2008-05-13 18:38 ` David Reitter
2008-05-13 19:06 ` Eli Zaretskii
2008-05-14 2:17 ` Chong Yidong
2008-05-14 4:28 ` Chong Yidong
2008-05-14 4:47 ` Stefan Monnier
2008-05-14 19:30 ` Chong Yidong
2008-05-14 20:50 ` Chong Yidong [this message]
2008-05-15 1:10 ` Stefan Monnier
2008-05-06 0:40 ` Next release YAMAMOTO Mitsuharu
2008-05-04 21:23 ` Chong Yidong
2008-05-05 0:44 ` YAMAMOTO Mitsuharu
2008-05-04 2:06 ` Dan Nicolaescu
2008-05-04 4:21 ` Eli Zaretskii
2008-05-04 6:58 ` Dan Nicolaescu
2008-05-04 8:15 ` David Kastrup
2008-05-04 18:17 ` Eli Zaretskii
2008-05-04 18:59 ` Dan Nicolaescu
2008-05-04 20:31 ` Thomas Lord
2008-05-04 7:36 ` David Kastrup
2008-05-04 16:00 ` Stefan Monnier
2008-05-04 14:34 ` Jason Rumney
2008-05-02 21:13 ` Richard M Stallman
2008-05-02 21:32 ` Chong Yidong
2008-05-03 0:11 ` Glenn Morris
2008-05-03 14:49 ` Chong Yidong
2008-05-03 17:02 ` Alex
2008-05-03 21:00 ` Richard M Stallman
2008-05-04 3:53 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r6c4sj8u.fsf@stupidchicken.com \
--to=cyd@stupidchicken.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.