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: Fri, 23 Feb 2007 07:42:27 +0100 Message-ID: <45DE8CD3.5080803@swipnet.se> References: <45DCAC15.40305@swipnet.se> <45DE32A0.40807@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1172212973 18113 80.91.229.12 (23 Feb 2007 06:42:53 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 23 Feb 2007 06:42:53 +0000 (UTC) Cc: Stefan Monnier , emacs-devel@gnu.org To: Jason Rumney Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 23 07:42:47 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 1HKU8h-0003j2-HS for ged-emacs-devel@m.gmane.org; Fri, 23 Feb 2007 07:42:43 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HKU8h-000558-2j for ged-emacs-devel@m.gmane.org; Fri, 23 Feb 2007 01:42:43 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HKU8W-000553-Gx for emacs-devel@gnu.org; Fri, 23 Feb 2007 01:42:32 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HKU8V-00054r-1j for emacs-devel@gnu.org; Fri, 23 Feb 2007 01:42:32 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HKU8U-00054o-Tu for emacs-devel@gnu.org; Fri, 23 Feb 2007 01:42:30 -0500 Original-Received: from av12-2-sn2.hy.skanova.net ([81.228.8.186]) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HKU8T-00079c-Ka; Fri, 23 Feb 2007 01:42:29 -0500 Original-Received: by av12-2-sn2.hy.skanova.net (Postfix, from userid 502) id C4C1237F63; Fri, 23 Feb 2007 07:42:28 +0100 (CET) Original-Received: from smtp4-1-sn2.hy.skanova.net (smtp4-1-sn2.hy.skanova.net [81.228.8.92]) by av12-2-sn2.hy.skanova.net (Postfix) with ESMTP id A958837EDC; Fri, 23 Feb 2007 07:42:28 +0100 (CET) Original-Received: from husetbladh.homeip.net (81-235-205-78-no59.tbcn.telia.com [81.235.205.78]) by smtp4-1-sn2.hy.skanova.net (Postfix) with ESMTP id 86BC837E4A; Fri, 23 Feb 2007 07:42:28 +0100 (CET) User-Agent: Thunderbird 1.5.0.9 (X11/20070103) In-Reply-To: <45DE32A0.40807@gnu.org> 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:66657 Archived-At: Jason Rumney skrev: > Stefan Monnier wrote: >> BTW, isn't the problem that Emacs uses `posix_memalign' because it's >> found >> in libc, even though its own malloc doesn't provide it? >> > For that to only happen when GTK is included, posix_memalign would have > to be exported by the GTK libraries, not by the standard libraries. > > I think the original diagnosis is right. Windows DLLs are linked to any > libraries they need at build time, so functions like malloc cannot be > overridden by the calling program. > Cygwin has some kind of hack to make sure the malloc called is the one a program supplies, if any. Unfortunately they don't include memalign in that hack, only malloc/calloc/realloc/free. I'm not familiar with the unexec used on cygwin, but it looks like it relies on the Emacs supplied malloc. Jan D.