From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: When should ralloc.c be used? Date: Mon, 24 Oct 2016 23:23:45 -0700 Organization: UCLA Computer Science Department Message-ID: <6fb40008-805c-4792-b538-280e779dbb51@cs.ucla.edu> References: <8760p2wzgj.fsf@users.sourceforge.net> <838ttyhhzu.fsf@gnu.org> <871szqwu51.fsf@users.sourceforge.net> <831szqhbc2.fsf@gnu.org> <87d1itt79z.fsf_-_@users.sourceforge.net> <7baa18d4-2b09-caa8-005e-29008a383ad1@cs.ucla.edu> <83mvhwrgd5.fsf@gnu.org> <8539f38f-9a11-44c3-4de7-bb974c96206c@cs.ucla.edu> <8360ojpndr.fsf@gnu.org> <83wpgzo30m.fsf@gnu.org> <5a4bbe6d-08ce-e6c6-39d1-49c9cd6d1ffd@cs.ucla.edu> <83mvhvns9a.fsf@gnu.org> <83d1irnozo.fsf@gnu.org> <83mvhunb0d.fsf@gnu.org> <423fab24-9be6-778c-58c3-29a0b825b8c7@cs.ucla.edu> <83a8du5gy1.fsf@gnu.org> <92ca0bf8-7ad4-a7de-70e5-ddbd6eab9741@cs.ucla.edu> <83zilt3dne.fsf@gnu.org> <83shrl3cf5.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------A5474981D6924DBA0D7A9D47" X-Trace: blaine.gmane.org 1477376740 576 195.159.176.226 (25 Oct 2016 06:25:40 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 25 Oct 2016 06:25:40 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 25 08:25:34 2016 Return-path: Envelope-to: ged-emacs-devel@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 1byvAx-0007Yh-9j for ged-emacs-devel@m.gmane.org; Tue, 25 Oct 2016 08:25:31 +0200 Original-Received: from localhost ([::1]:52127 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1byvAz-0006io-8n for ged-emacs-devel@m.gmane.org; Tue, 25 Oct 2016 02:25:33 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59275) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1byv9T-0005RQ-Ii for emacs-devel@gnu.org; Tue, 25 Oct 2016 02:24:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1byv9S-0000Eh-Aa for emacs-devel@gnu.org; Tue, 25 Oct 2016 02:23:59 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:34200) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1byv9N-0000BR-B2; Tue, 25 Oct 2016 02:23:53 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 24327160D74; Mon, 24 Oct 2016 23:23:50 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id U6dsREHZCU3E; Mon, 24 Oct 2016 23:23:45 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 9B606160D96; Mon, 24 Oct 2016 23:23:45 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id DWBNWhsK7Fqg; Mon, 24 Oct 2016 23:23:45 -0700 (PDT) Original-Received: from [192.168.1.9] (unknown [47.153.178.162]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 79E4A160D74; Mon, 24 Oct 2016 23:23:45 -0700 (PDT) In-Reply-To: <83shrl3cf5.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 131.179.128.68 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:208752 Archived-At: This is a multi-part message in MIME format. --------------A5474981D6924DBA0D7A9D47 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable >>> . Build with gmalloc but without ralloc. >> >> This goes back to what we were doing, no? > > No, we were using the glibc malloc, AFAIK. Or am I missing something? No you're right, I was sloppy. >> How about the attached patch for emacs-25? Basically, it says "use >> ralloc.c only if requested via './configure REL_ALLOC=3Dyes'". > > LGTM. Should we wait for people to build with REL_ALLOC=3Dno manually, > to see if there are any problems, or should we push this right away? I doubt whether many more people will build with REL_ALLOC=3Dno. So I thi= nk we=20 should push it into emacs-25. Proposed patch attached. I have tested this= on=20 Fedora 24 x86-64 and Ubuntu 16.04 x86-64 with './configure=20 emacs_cv_var_doug_lea_malloc=3Dno' to simulate bleeding-edge glibc. --------------A5474981D6924DBA0D7A9D47 Content-Type: text/x-diff; name="0001-Default-REL_ALLOC-to-no.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0001-Default-REL_ALLOC-to-no.patch" =46rom 561110345c48d48b4621d2e59487c2c17fcc988c Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 24 Oct 2016 23:11:32 -0700 Subject: [PATCH] Default REL_ALLOC to 'no' This should make ralloc-related bugs less likely on GNU/Linux systems with bleeding-edge glibc. See the email thread containing: http://lists.gnu.org/archive/html/emacs-devel/2016-10/msg00801.html Do not merge to master. * configure.ac (REL_ALLOC): Default to 'no' on all platforms, not merely on platforms with Doug Lea malloc. Although bleeding-edge glibc no longer exports __malloc_initialize_hook and so longer passes the configure-time test for Doug Lea malloc, ralloc tickles longstanding bugs like Bug#24358 and Bug#24764 and Emacs is likely to be more reliable without it. This patch is not needed on master, which uses hybrid malloc in this situation. --- configure.ac | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index ae7dfe5..19b44bd 100644 --- a/configure.ac +++ b/configure.ac @@ -2189,18 +2189,10 @@ if test "$doug_lea_malloc" =3D "yes" ; then AC_DEFINE(DOUG_LEA_MALLOC, 1, [Define to 1 if the system memory allocator is Doug Lea style, with malloc hooks and malloc_set_state.]) - - ## Use mmap directly for allocating larger buffers. - ## FIXME this comes from src/s/{gnu,gnu-linux}.h: - ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif - ## Does the AC_FUNC_MMAP test below make this check unnecessary? - case "$opsys" in - mingw32|gnu*) REL_ALLOC=3Dno ;; - esac fi =20 if test x"${REL_ALLOC}" =3D x; then - REL_ALLOC=3D${GNU_MALLOC} + REL_ALLOC=3Dno fi =20 use_mmap_for_buffers=3Dno --=20 2.7.4 --------------A5474981D6924DBA0D7A9D47--