all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ken Raeburn <raeburn@raeburn.org>
To: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Cc: emacs-devel@gnu.org
Subject: Re: [mituharu@math.s.chiba-u.ac.jp: Re: emacs-22.1 with GTK dumps	core	when Gnome wigets clicked]
Date: Mon, 25 Jun 2007 05:30:14 -0400	[thread overview]
Message-ID: <0B83D28B-95EF-4022-B447-63EA6BB3792E@raeburn.org> (raw)
In-Reply-To: <wlir9ce8qq.wl%mituharu@math.s.chiba-u.ac.jp>

On Jun 25, 2007, at 04:30, YAMAMOTO Mitsuharu wrote:
>> Nor is this change guaranteed to cause there to be only one access to
>> "__malloc_hook", unless you change it to be declared volatile.  (And,
>> in fact, if you're optimizing, I would've expected it to be only one
>> access in the original code on nearly all platforms.)
>
> As a matter of fact, the original code caused a real problem:
>
>   http://lists.gnu.org/archive/html/bug-gnu-emacs/2007-06/ 
> msg00170.html

I'd believe it could be, sure.  But if that code were produced with  
gcc -O2, I'd be disappointed.  Other compilers ... eh, some of them  
aren't that good. :-)

>> Mutex protection around accesses to the hook variable would be the
>> safest (and wouldn't require temporary variables or volatile
>> qualifiers), though performance would not be as good.
>
> Temporary variables will be necessary so that we can unlock the mutex
> before the actual call to the hook.  We also need to add some special
> functions to change the hook variables and use them instead of
> assignments to the hook variables in alloc.c.  That's why I said that
> "malloc in glibc 2.5 also does the same thing and I suspect that we
> cannot do better as long as we try to keep the same interface with
> respect to __malloc_hook etc." in
> http://lists.gnu.org/archive/html/emacs-devel/2007-06/msg01503.html

Yes, I think keeping the current glibc interface -- at least, as the  
one we actually use -- seems like a poor idea.  Though the change  
should be coordinated with glibc maintainers, of course.

Ken

  reply	other threads:[~2007-06-25  9:30 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-17 21:49 [mituharu@math.s.chiba-u.ac.jp: Re: emacs-22.1 with GTK dumps core when Gnome wigets clicked] Richard Stallman
2007-06-18  1:11 ` YAMAMOTO Mitsuharu
2007-06-21 10:13   ` Jan Djärv
2007-06-21 11:36     ` YAMAMOTO Mitsuharu
2007-06-25  5:33     ` Ken Raeburn
2007-06-25  8:30       ` YAMAMOTO Mitsuharu
2007-06-25  9:30         ` Ken Raeburn [this message]
2007-06-25 10:05           ` YAMAMOTO Mitsuharu
2007-06-25 15:46             ` Richard Stallman
2007-06-26  3:45               ` YAMAMOTO Mitsuharu
2007-06-26 22:48                 ` Richard Stallman
2007-06-25 15:46             ` Richard Stallman
2007-06-25 16:33               ` Stefan Monnier
2007-06-25 17:04                 ` Chong Yidong
2007-06-26 16:58                   ` Richard Stallman
2007-06-26 21:20                     ` David Kastrup
2007-06-26 23:01                       ` Jason Rumney
2007-06-27 16:47                       ` Richard Stallman
2007-06-26 23:35                     ` Chong Yidong
2007-06-27  1:31                       ` Stefan Monnier
2007-06-27 19:50                       ` Richard Stallman
2007-06-26 16:58                 ` Richard Stallman
2007-06-24 23:47   ` Richard Stallman

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=0B83D28B-95EF-4022-B447-63EA6BB3792E@raeburn.org \
    --to=raeburn@raeburn.org \
    --cc=emacs-devel@gnu.org \
    --cc=mituharu@math.s.chiba-u.ac.jp \
    /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.