[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#22086: 25.1.50; [PATCH] Integrate the musl hybrid malloc patch for e

From: Wolfgang Jenkner
Subject: bug#22086: 25.1.50; [PATCH] Integrate the musl hybrid malloc patch for elf systems
Date: Thu, 03 Dec 2015 18:57:47 +0100
User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.1.50 (berkeley-unix)

In the thread around


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


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



Attachment: 0002-For-HYBRID_MALLOC-give-most-gmalloc-symbols-internal.patch
Description: Keep gmalloc symbols internal

Attachment: 0003-Link-temacs-with-gnulib-objects-compiled-with-Demacs.patch
Description: Compile separate gnulib.a for emacs with -Demacs

Attachment: 0004-Add-musl-patch-to-support-HYBRID_MALLOC-on-elf-syste.patch
Description: The patch from musl, essentially

Attachment: 0005-configure.ac-Stop-using-mmap-for-buffers-for-FreeBSD.patch
Description: No special case for FreeBSD wrt mmap

reply via email to

[Prev in Thread] Current Thread [Next in Thread]