From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Jan_Dj=E4rv?= Newsgroups: gmane.emacs.devel Subject: Re: Building without Emacs malloc, possible? Date: Thu, 22 Feb 2007 07:57:59 +0100 Message-ID: <45DD3EF7.9080906@swipnet.se> References: <45DCAC15.40305@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: sea.gmane.org 1172127513 12447 80.91.229.12 (22 Feb 2007 06:58:33 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 22 Feb 2007 06:58:33 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 22 07:58:27 2007 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 1HK7uM-0003TK-QW for ged-emacs-devel@m.gmane.org; Thu, 22 Feb 2007 07:58:27 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HK7uM-0001z9-Hy for ged-emacs-devel@m.gmane.org; Thu, 22 Feb 2007 01:58:26 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HK7uC-0001yr-FA for emacs-devel@gnu.org; Thu, 22 Feb 2007 01:58:16 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HK7uB-0001yR-En for emacs-devel@gnu.org; Thu, 22 Feb 2007 01:58:15 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HK7uB-0001yN-Ak for emacs-devel@gnu.org; Thu, 22 Feb 2007 01:58:15 -0500 Original-Received: from av12-1-sn2.hy.skanova.net ([81.228.8.185]) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HK7u8-00081I-VY; Thu, 22 Feb 2007 01:58:13 -0500 Original-Received: by av12-1-sn2.hy.skanova.net (Postfix, from userid 502) id 01F2A37FAA; Thu, 22 Feb 2007 07:58:11 +0100 (CET) Original-Received: from smtp4-2-sn2.hy.skanova.net (smtp4-2-sn2.hy.skanova.net [81.228.8.93]) by av12-1-sn2.hy.skanova.net (Postfix) with ESMTP id D5B0237EEE; Thu, 22 Feb 2007 07:58:11 +0100 (CET) Original-Received: from husetbladh.homeip.net (81-235-205-78-no59.tbcn.telia.com [81.235.205.78]) by smtp4-2-sn2.hy.skanova.net (Postfix) with ESMTP id BCC2F37E9E; Thu, 22 Feb 2007 07:58:11 +0100 (CET) User-Agent: Thunderbird 1.5.0.9 (X11/20070212) In-Reply-To: X-detected-kernel: Linux 2.4-2.6 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:66599 Archived-At: Eli Zaretskii skrev: >> Date: Wed, 21 Feb 2007 21:31:17 +0100 >> From: =?ISO-8859-1?Q?Jan_Dj=E4rv?= >> >> What is the status of building without Emac malloc? There are some problems >> on cygwin + Gtk. Basically Gtk+ (glib actually) calls memalign, but on cygwin >> this does not call the Emacs supplied memalign, but cygwins own. Since malloc >> is the one Emacs has, cygwin memalign refuses to work. I don't know why the >> Emace memalign is not called, dynamic libraries on W32 seems to behave strange >> in this regard. > > That is very unfortunate. Using system malloc will cause Emacs to > grow in its footprint much more than it does with gmalloc, possibly an > unlimited growth. Did you try asking for advice on the Cygwin mailing > list? Yes, the advice was that Emacs should not use its own malloc in this case. If that works, I'll add a configure check so that Emacs uses its own malloc on cygwin except when Gtk+ is used. I still don't understand why the Emacs supplied memalign doesn't get called. > >> One solution would be for Emacs to not use its own malloc, but that gives >> compilation errors. I don't have the errors here, but they are unresolved >> symbols in vm-limit.c. >> >> So, the question is what is need to compile on cygwin without Emacs malloc? I >> just added >> >> #define SYSTEM_MALLOC >> >> to s/cygwin.h. Apparently something more is needed. > > Defining SYSTEM_MALLOC ought to be enough. What errors do you see? > Do the same errors happen when you try building with SYSTEM_MALLOC on > GNU/Linux? > > Btw, I think you need to "make distclean" and reconfigure after adding > SYSTEM_MALLOC; maybe you didn't, and that's the reason for the > problems? I'll try again with that when I get access to the w32 machine again. Thanks for the advice. Jan D.