From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: npostavs@users.sourceforge.net Newsgroups: gmane.emacs.bugs Subject: bug#27416: [PROPOSED] Simplify malloc replacement on glibc Date: Sun, 18 Jun 2017 10:07:53 -0400 Message-ID: <87shixqthi.fsf@users.sourceforge.net> References: <20170618002818.20744-1-eggert@cs.ucla.edu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1497794837 26708 195.159.176.226 (18 Jun 2017 14:07:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 18 Jun 2017 14:07:17 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) Cc: 27416@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jun 18 16:07:13 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dMarB-0006f3-64 for geb-bug-gnu-emacs@m.gmane.org; Sun, 18 Jun 2017 16:07:13 +0200 Original-Received: from localhost ([::1]:38486 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMarE-00069w-Pi for geb-bug-gnu-emacs@m.gmane.org; Sun, 18 Jun 2017 10:07:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51375) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMar5-00069J-E9 for bug-gnu-emacs@gnu.org; Sun, 18 Jun 2017 10:07:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dMar0-0004ro-Es for bug-gnu-emacs@gnu.org; Sun, 18 Jun 2017 10:07:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52546) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dMar0-0004rd-9r for bug-gnu-emacs@gnu.org; Sun, 18 Jun 2017 10:07:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dMar0-0003P0-4V for bug-gnu-emacs@gnu.org; Sun, 18 Jun 2017 10:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 Jun 2017 14:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27416 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 27416-submit@debbugs.gnu.org id=B27416.149779478513028 (code B ref 27416); Sun, 18 Jun 2017 14:07:02 +0000 Original-Received: (at 27416) by debbugs.gnu.org; 18 Jun 2017 14:06:25 +0000 Original-Received: from localhost ([127.0.0.1]:55223 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dMaqP-0003Nz-Ff for submit@debbugs.gnu.org; Sun, 18 Jun 2017 10:06:25 -0400 Original-Received: from mail-io0-f196.google.com ([209.85.223.196]:34857) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dMaqN-0003Ng-ER; Sun, 18 Jun 2017 10:06:23 -0400 Original-Received: by mail-io0-f196.google.com with SMTP id f79so8848225ioi.2; Sun, 18 Jun 2017 07:06:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=pGocdIwLEs1O4Rzxt0g9pXXEbI6kV6CCE6bOnTy6Kw4=; b=f4bRW3O4y1EXLDdhqDbtwjUcxEVBu4RUKbj5wejBvv3NmYuxlvI9H7rnHvpqcZy5MI ULGD1LF0gShak2MO2EiWducfQeO7BeP8V5ZbNCNcTStyJKklu6EFX2vFgg20WLUPT3pX zX98gzvxmj+cSZKpDfv9d83I2JXIZzxrfiZ+mGOGOKfk1YjsdnSsEoggSBcrephbKXz0 WBdeSpJfWOScAymgkeOayC9dFarZg8EpD2qcYdhOdaf+9ZuKhwbQ2AMdNzyPQMUhsFxc T0UIrnMDWVcKYwfgmQgWbQmCGgOiL97N8K4NmR5QqssCTNQtIuA3XK0oh5J4m+3141PP f7IQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version :content-transfer-encoding; bh=pGocdIwLEs1O4Rzxt0g9pXXEbI6kV6CCE6bOnTy6Kw4=; b=EtgVmQCtqeqBFw1V1XcffC6F0vuZFTyYdabw7w0CZxjZ/LU4NTm6BboCxiJm29lznK jyRQ2qErdrZran6WCcy29e4NcI9J1R5Rybd7eJbcHRBJ9nS/WkhI72nABaexRc+JpW5M 62wgQ8sKgxRpZIENrkFZ1W2p7HaWl9Q8jKWFOdgAdTg/SGqHk1o6SEzUhPfF5X3QoipE Ij68Zen0ChKGJuCexoEV10KLPSdsALL6KzlFUg/txhgUsBgAXv7oUxNh1vMoVAz3OtBA crJi/Bbp79Ccj6yoT4DpKwSIr8v1ANWhFiZrk6cOt0kaYUC3v5so4Z9Z0jrpQPhjoaYo 8F4Q== X-Gm-Message-State: AKS2vOzHsq56Y4N/lpi+/9RkT696AXJpHSO1xA6b4X0ZyK0X+vlhLdoD ZfKAKyp37u5tggl2 X-Received: by 10.107.142.136 with SMTP id q130mr19139564iod.225.1497794777636; Sun, 18 Jun 2017 07:06:17 -0700 (PDT) Original-Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id j21sm2384827itb.15.2017.06.18.07.06.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 18 Jun 2017 07:06:17 -0700 (PDT) In-Reply-To: <20170618002818.20744-1-eggert@cs.ucla.edu> (Paul Eggert's message of "Sat, 17 Jun 2017 17:28:18 -0700") 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" Xref: news.gmane.org gmane.emacs.bugs:133729 Archived-At: tags 27416 + patch severity 27416 wishlist quit Paul Eggert writes: > This avoids the need to build lib/e-gettime.o etc. on glibc > platforms, as plain lib/gettime.o will do. Could you add something like the summary you posted in http://lists.gnu.org/archive/html/emacs-devel/2017-06/msg00351.html to the commit message, I found the explanation here a bit confusing until I read that. [Replace] Emacs's hybrid malloc implementation on GNUish platforms with a hybrid implementation that redefines malloc instead of re-#defining it. That is, instead of defining a function hybrid_malloc that can call either gmalloc or the system malloc (and using the macro "#define malloc hybrid_malloc" in Emacs code), Emacs defines a function malloc that can call either gmalloc or the system malloc (via the latter=E2=80=99s alternate name =E2=80=98__libc_malloc= =E2=80=99), without using a macro. [T]he Emacs build process no longer needs to compile library files twice. For example, it can simply build lib/gettime.o from lib/gettime.c, rather than having to build both lib/gettime.o and lib/e-gettime.o. This is because there is only one malloc symbol used by Emacs code, not two. The hybrid malloc approach would not change on non-GNUish platforms.