From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Jan D." Newsgroups: gmane.emacs.devel Subject: Re: Fix for Cygwin/GSlice problem Date: Wed, 09 Dec 2009 09:05:55 +0100 Message-ID: <4B1F5A63.3030509@swipnet.se> References: <4B1EA7F6.3090504@cornell.edu> <4B1F1424.9020105@cornell.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: Quoted-Printable X-Trace: ger.gmane.org 1260346007 7377 80.91.229.12 (9 Dec 2009 08:06:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 9 Dec 2009 08:06:47 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org To: Ken Brown Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 09 09:06:39 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NIHZH-00081b-8T for ged-emacs-devel@m.gmane.org; Wed, 09 Dec 2009 09:06:39 +0100 Original-Received: from localhost ([127.0.0.1]:51897 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NIHZH-0003x7-0q for ged-emacs-devel@m.gmane.org; Wed, 09 Dec 2009 03:06:39 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NIHYo-0003i5-OD for emacs-devel@gnu.org; Wed, 09 Dec 2009 03:06:10 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NIHYj-0003e8-2L for emacs-devel@gnu.org; Wed, 09 Dec 2009 03:06:09 -0500 Original-Received: from [199.232.76.173] (port=35130 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NIHYi-0003e1-UK for emacs-devel@gnu.org; Wed, 09 Dec 2009 03:06:04 -0500 Original-Received: from proxy2.bredband.net ([195.54.101.72]:34022) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NIHYh-0000oh-9N for emacs-devel@gnu.org; Wed, 09 Dec 2009 03:06:03 -0500 Original-Received: from ipb2.telenor.se (195.54.127.165) by proxy2.bredband.net (7.3.140.3) id 4AD3E1BC0193A8F3 for emacs-devel@gnu.org; Wed, 9 Dec 2009 09:05:58 +0100 X-SMTPAUTH-B2: X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArpZAL/oHktV4S1uPGdsb2JhbACBTJc5glMBAQEBN7sahCwEjSA X-IronPort-AV: E=Sophos;i="4.47,367,1257116400"; d="scan'208";a="13196548" Original-Received: from c-6e2de155.25-1-64736c10.cust.bredbandsbolaget.se (HELO coolsville.localdomain) ([85.225.45.110]) by ipb2.telenor.se with ESMTP; 09 Dec 2009 09:05:58 +0100 Original-Received: from [10.225.40.64] (unknown [193.45.43.33]) by coolsville.localdomain (Postfix) with ESMTPSA id 11EC37FA07B; Wed, 9 Dec 2009 09:05:56 +0100 (CET) User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.5) Gecko/20091121 Thunderbird/3.0 In-Reply-To: <4B1F1424.9020105@cornell.edu> X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:118438 Archived-At: 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=3Dalways-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=20 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=E4rv 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=20 linking of malloc and friends. I don't understand why Cygwin doesn't=20 allow an application to have its own memalign, but do allow it to have=20 its own malloc. Jan D.