GNU bug report logs -
#22086
25.1.50; [PATCH] Integrate the musl hybrid malloc patch for elf systems
Previous Next
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
[Message part 1 (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.