emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fix for Cygwin/GSlice problem


From: Jan D.
Subject: Re: Fix for Cygwin/GSlice problem
Date: Wed, 09 Dec 2009 09:05:55 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.5) Gecko/20091121 Thunderbird/3.0

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 via email to

[Prev in Thread] Current Thread [Next in Thread]