GNU bug report logs - #22086
25.1.50; [PATCH] Integrate the musl hybrid malloc patch for elf systems

Previous Next

Package: emacs;

Reported by: Wolfgang Jenkner <wjenkner <at> inode.at>

Date: Thu, 3 Dec 2015 18:02:01 UTC

Severity: important

Tags: patch

Found in version 25.1.50

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Wolfgang Jenkner <wjenkner <at> inode.at>
Subject: bug#22086: closed (Re: bug#22086: 25.1.50; [PATCH] Integrate the
 musl hybrid mallo)
Date: Sun, 31 Jan 2016 00:44:01 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#22086: 25.1.50; [PATCH] Integrate the musl hybrid malloc patch for elf systems

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 22086 <at> debbugs.gnu.org.

-- 
22086: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22086
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: wjenkner <at> inode.at, dalias <at> aerifal.cx, dancol <at> dancol.org, kbrown <at> cornell.edu,
 22086-done <at> debbugs.gnu.org
Subject: Re: bug#22086: 25.1.50; [PATCH] Integrate the musl hybrid mallo
Date: Sat, 30 Jan 2016 16:43:28 -0800
Eli Zaretskii wrote:
> I think
> when the time comes you should commit this to the master branch, not
> to emacs-25.

I think it's ready enough for the master branch, so I committed it there and 
will mark this bug as done.

I had to do a merge first, which was pretty painful, but that should be a 
different thread.



[Message part 3 (message/rfc822, inline)]
From: Wolfgang Jenkner <wjenkner <at> inode.at>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.1.50;
 [PATCH] Integrate the musl hybrid malloc patch for elf systems
Date: Thu, 03 Dec 2015 18:57:47 +0100
[Message part 4 (text/plain, inline)]
In the thread around

http://permalink.gmane.org/gmane.emacs.devel/182469

Rich Felker announced that he had found that a small addition to
unexelf.c allowed emacs to extend its hybrid malloc implementation
(previously only used for cygwin) to musl libc, but without using
features specific to that malloc implementation.

A corresponding patch was tested in the "Alpine Linux" distribution, see

http://git.alpinelinux.org/cgit/aports/plain/testing/emacs/musl.patch?id=d6f211ec868df4657c745b8ba2bae77b2a7fb7f6

This patch series proposes the relevant part of that change and adds
some (rather trivial) groundwork to make it reliably work on all systems
which use unexelf.c for dumping.

Personally, I've been using hybrid malloc on top of the libc malloc
(jemalloc) on FreeBSD 10 for several months now without problems.

I also tested it with other malloc libraries, in particular some of
those derived from Doug Lea's malloc.  It also works on GNU/Linux, on
top of glibc.  This might be of some interest as, IIRC, some glibc
people were not too happy about keeping malloc_get_state and stuff.

If you get an error about exceeding "static heap size" during dumping
just bump STATIC_HEAP_SIZE in src/sheap.c a bit.

If the commit messages in the following patches don't explain enough,
please ask.  Also, please apply the patch from

http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22085

beforehand.

[0002-For-HYBRID_MALLOC-give-most-gmalloc-symbols-internal.patch (text/x-diff, attachment)]
[0003-Link-temacs-with-gnulib-objects-compiled-with-Demacs.patch (text/x-diff, attachment)]
[0004-Add-musl-patch-to-support-HYBRID_MALLOC-on-elf-syste.patch (text/x-diff, attachment)]
[0005-configure.ac-Stop-using-mmap-for-buffers-for-FreeBSD.patch (text/x-diff, attachment)]

This bug report was last modified 9 years and 102 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.