all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Jan D." <jan.h.d@swipnet.se>
To: Ken Brown <kbrown@cornell.edu>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>, emacs-devel@gnu.org
Subject: Re: Fix for Cygwin/GSlice problem
Date: Wed, 09 Dec 2009 09:05:55 +0100	[thread overview]
Message-ID: <4B1F5A63.3030509@swipnet.se> (raw)
In-Reply-To: <4B1F1424.9020105@cornell.edu>

On 2009-12-09 04:06, Ken Brown wrote:
> On 12/8/2009 8:33 PM, Stefan Monnier wrote:
>>> +/* Emacs supplies its own malloc, but glib (part of Gtk+) calls
>>> + memalign and on Cygwin, that becomes the Cygwin supplied memalign.
>>> + As malloc is not the Cygwin malloc, the Cygwin memalign always
>>> + returns ENOSYS. A workaround is to set G_SLICE=always-malloc. */
>>> +#define G_SLICE_ALWAYS_MALLOC
>>
>> Why does Cygwin-Emacs use its own malloc rather than the system malloc?

Emacs prefers its own malloc when the system malloc doesn't have the 
required hooks.  If this is critical or not I don't know.

>
> There was a long thread about this on the Cygwin list in 2007, in which
> Jan Djärv tried to sort this out. It starts at
>
> http://cygwin.com/ml/cygwin/2007-02/threads.html#00469
>
> and continues at
>
> http://cygwin.com/ml/cygwin/2007-02/threads.html#00503
>
> I'm afraid a lot of that discussion is over my head. All I can say is
> that the Emacs build brings in the Emacs malloc and friends, but when
> glib calls memalign, the Cygwin memalign gets called instead of the one
> supplied by Emacs. Maybe Jan can explain why it wasn't possible to
> change this or to simply use Cygwin's malloc and friends. He seemed
> optimistic at the end of thread, but then the discussion stopped.

I think it stopped because it came down to the way Cygwin handles 
linking of malloc and friends.  I don't understand why Cygwin doesn't 
allow an application to have its own memalign, but do allow it to have 
its own malloc.

	Jan D.





  reply	other threads:[~2009-12-09  8:05 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-08 19:24 Fix for Cygwin/GSlice problem Ken Brown
2009-12-09  1:07 ` Chong Yidong
2009-12-09  1:33 ` Stefan Monnier
2009-12-09  3:06   ` Ken Brown
2009-12-09  8:05     ` Jan D. [this message]
2009-12-09 14:31       ` Stefan Monnier
2009-12-09 15:00         ` Ken Brown
2009-12-09 16:30           ` Ken Brown
2009-12-09 18:53             ` Jan Djärv
2009-12-09 19:29               ` Ken Brown
2009-12-09 20:39                 ` Jan Djärv
2009-12-10 12:16               ` Ken Brown
2009-12-09 17:31         ` Jan Djärv
  -- strict thread matches above, loose matches on Subject: below --
2009-12-09  0:43 Angelo Graziosi
2009-12-15 16:06 Angelo Graziosi
2009-12-15 16:13 ` Chong Yidong
2009-12-15 16:18   ` Angelo Graziosi
2009-12-16 22:47   ` Angelo Graziosi

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=4B1F5A63.3030509@swipnet.se \
    --to=jan.h.d@swipnet.se \
    --cc=emacs-devel@gnu.org \
    --cc=kbrown@cornell.edu \
    --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.