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: Wed, 09 Dec 2009 10:00:28 -0500 Message-ID: <4B1FBB8C.5090909@cornell.edu> References: <4B1EA7F6.3090504@cornell.edu> <4B1F1424.9020105@cornell.edu> <4B1F5A63.3030509@swipnet.se> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1260370850 26564 80.91.229.12 (9 Dec 2009 15:00:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 9 Dec 2009 15:00:50 +0000 (UTC) Cc: "Jan D." , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 09 16:00:43 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 1NIO1y-0007Vg-RT for ged-emacs-devel@m.gmane.org; Wed, 09 Dec 2009 16:00:43 +0100 Original-Received: from localhost ([127.0.0.1]:51532 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NIO1y-0005U4-GK for ged-emacs-devel@m.gmane.org; Wed, 09 Dec 2009 10:00:42 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NIO1s-0005Tr-AB for emacs-devel@gnu.org; Wed, 09 Dec 2009 10:00:36 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NIO1m-0005Pb-Eq for emacs-devel@gnu.org; Wed, 09 Dec 2009 10:00:34 -0500 Original-Received: from [199.232.76.173] (port=44814 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NIO1m-0005PU-Bv for emacs-devel@gnu.org; Wed, 09 Dec 2009 10:00:30 -0500 Original-Received: from granite1.mail.cornell.edu ([128.253.83.141]:54458 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 1NIO1l-0002ga-TB for emacs-devel@gnu.org; Wed, 09 Dec 2009 10:00:30 -0500 Original-Received: from [128.84.234.191] (markov.math.cornell.edu [128.84.234.191]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.13.1/8.12.10) with ESMTP id nB9F0SVp008610 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 9 Dec 2009 10:00:28 -0500 (EST) User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) In-Reply-To: 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:118456 Archived-At: On 12/9/2009 9:31 AM, 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. > > I'd suggest we try to use Cygwin's system malloc, with a clear comment > about why we don't use our own, and what kind of workaround could be > used (the G_SLICE_ALWAYS_MALLOC) if we wanted to use our own. OK, I'll give it a try and report back. I assume the way to do this is to remove '#define G_SLICE_ALWAYS_MALLOC' from src/s/cygwin.h and instead #define SYSTEM_MALLOC. [You don't need to respond unless this is wrong.] Ken