From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#22086: 25.1.50; [PATCH] Integrate the musl hybrid malloc patch for elf systems Date: Mon, 21 Dec 2015 05:44:01 +0200 Message-ID: <83vb7ssby6.fsf@gnu.org> References: <85poynxvgy.fsf@iznogoud.viz> <567120C0.6080803@cs.ucla.edu> <85h9jhdxl2.fsf@iznogoud.viz> <56772CB2.8060004@cs.ucla.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1450669463 32309 80.91.229.3 (21 Dec 2015 03:44:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 21 Dec 2015 03:44:23 +0000 (UTC) Cc: wjenkner@inode.at, dalias@aerifal.cx, 22086@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Dec 21 04:44:13 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aArOO-0004TA-Gs for geb-bug-gnu-emacs@m.gmane.org; Mon, 21 Dec 2015 04:44:12 +0100 Original-Received: from localhost ([::1]:42960 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aArOO-0005GP-1m for geb-bug-gnu-emacs@m.gmane.org; Sun, 20 Dec 2015 22:44:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56506) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aArOI-0005GJ-Ka for bug-gnu-emacs@gnu.org; Sun, 20 Dec 2015 22:44:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aArOE-0004FI-Bq for bug-gnu-emacs@gnu.org; Sun, 20 Dec 2015 22:44:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:50865) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aArOE-0004FE-8N for bug-gnu-emacs@gnu.org; Sun, 20 Dec 2015 22:44:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aArOE-0008N0-0r for bug-gnu-emacs@gnu.org; Sun, 20 Dec 2015 22:44:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Dec 2015 03:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22086 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 22086-submit@debbugs.gnu.org id=B22086.145066942232142 (code B ref 22086); Mon, 21 Dec 2015 03:44:01 +0000 Original-Received: (at 22086) by debbugs.gnu.org; 21 Dec 2015 03:43:42 +0000 Original-Received: from localhost ([127.0.0.1]:58467 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aArNu-0008MM-KL for submit@debbugs.gnu.org; Sun, 20 Dec 2015 22:43:42 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:37159) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aArNt-0008M8-BF for 22086@debbugs.gnu.org; Sun, 20 Dec 2015 22:43:41 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aArNj-0004Aq-PM for 22086@debbugs.gnu.org; Sun, 20 Dec 2015 22:43:36 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:51526) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aArNj-0004Al-ME; Sun, 20 Dec 2015 22:43:31 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4786 helo=HOME-C4E4A596F7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aArNi-0005ln-So; Sun, 20 Dec 2015 22:43:31 -0500 In-reply-to: <56772CB2.8060004@cs.ucla.edu> (message from Paul Eggert on Sun, 20 Dec 2015 14:33:22 -0800) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:110229 Archived-At: > From: Paul Eggert > Date: Sun, 20 Dec 2015 14:33:22 -0800 > Cc: Rich Felker , 22086@debbugs.gnu.org > > The simpler approach is to remove gmalloc.c, and to use the system memory > allocator, i.e., to behave as if SYSTEM_MALLOC is defined on all platforms. > > We can still support hybrid malloc for Cygwin, if SYSTEM_MALLOC wouldn't work on > Cygwin for some reason; and we can support the similar hybrid on Darwin, if it's > still needed. But in neither approach should we override the system malloc; any > Emacs-specific allocation function we define should be called (say) emalloc > instead of malloc, so that it does not conflict with the system malloc. That > way, we don't have to worry about name-space collisions, either at compile-time > or at link-time. > > If I'm wrong about gmalloc.c and it is still needed on some platforms for some > reason, we can continue to use it, but it should define emalloc etc., and not > attempt to override the C standard library. Wouldn't memory allocated with emallooc conflict with uses of malloc in the startup code? Other than that, I'm okay with leaving gmalloc.c's allocator under a different name. Removing it is something we should consider separately. > Long ago as I recall, we really needed to override the C standard library on > some platforms, due to the funny way in which undumped storage was made > read-only. That need is obsolete, though, which should let us simplify things now. Why is it obsolete?