From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ken Brown Newsgroups: gmane.emacs.devel Subject: Re: Fix for Cygwin/GSlice problem Date: Tue, 08 Dec 2009 22:06:12 -0500 Message-ID: <4B1F1424.9020105@cornell.edu> References: <4B1EA7F6.3090504@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 1260328026 31567 80.91.229.12 (9 Dec 2009 03:07:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 9 Dec 2009 03:07:06 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 09 04:06:59 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 1NICsm-0007xU-Nc for ged-emacs-devel@m.gmane.org; Wed, 09 Dec 2009 04:06:28 +0100 Original-Received: from localhost ([127.0.0.1]:36333 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NICsm-0001q0-1a for ged-emacs-devel@m.gmane.org; Tue, 08 Dec 2009 22:06:28 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NICsg-0001ow-B9 for emacs-devel@gnu.org; Tue, 08 Dec 2009 22:06:22 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NICsb-0001nR-8D for emacs-devel@gnu.org; Tue, 08 Dec 2009 22:06:21 -0500 Original-Received: from [199.232.76.173] (port=45712 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NICsb-0001nO-5o for emacs-devel@gnu.org; Tue, 08 Dec 2009 22:06:17 -0500 Original-Received: from granite1.mail.cornell.edu ([128.253.83.141]:64836 helo=authusersmtp.mail.cornell.edu) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NICsa-0007rt-RN for emacs-devel@gnu.org; Tue, 08 Dec 2009 22:06:17 -0500 Original-Received: from [127.0.0.1] (cpe-67-241-20-9.twcny.res.rr.com [67.241.20.9]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.13.1/8.12.10) with ESMTP id nB936EPH018935; Tue, 8 Dec 2009 22:06:15 -0500 (EST) User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) In-Reply-To: X-Antivirus: avast! (VPS 091208-1, 12/08/2009), Outbound message X-Antivirus-Status: Clean X-MIME-Autoconverted: from 8bit to quoted-printable by authusersmtp.mail.cornell.edu id nB936EPH018935 X-detected-operating-system: by monty-python.gnu.org: Solaris 9 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:118419 Archived-At: 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 >=20 > Why does Cygwin-Emacs use its own malloc rather than the system malloc? There was a long thread about this on the Cygwin list in 2007, in which=20 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=20 that the Emacs build brings in the Emacs malloc and friends, but when=20 glib calls memalign, the Cygwin memalign gets called instead of the one=20 supplied by Emacs. Maybe Jan can explain why it wasn't possible to=20 change this or to simply use Cygwin's malloc and friends. He seemed=20 optimistic at the end of thread, but then the discussion stopped. Ken