[PATCH] malloc: Rewrite dumped heap for compatibility in __malloc_set_state
Florian Weimer
fweimer@redhat.com
Thu May 5 20:13:00 GMT 2016
This will allow us to change many aspects of the malloc implementation
while preserving compatibility with existing Emacs binaries.
As a result, existing Emacs binaries will have a larger RSS, and Emacs
needs a few more milliseconds to start. This overhead is specific to
Emacs (and will go away once Emacs switches to its internal malloc).
The new checks to make free and realloc compatible with the dumped heap
are confined to the mmap paths, which are already quite slow due to the
munmap overhead.
This patch weakens some security checks, but only for heap pointers in
the dumped main arena. By default, this area is empty, so those checks
are as effective as before.
I tested this on ppc (32-bit) with an additional patch which changes
malloc alignment, and on x86_64. In both cases, I was able to run
pre-existing Emacs binaries.
Florian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-malloc-Rewrite-dumped-heap-for-compatibility-in-__ma.patch
Type: text/x-patch
Size: 10846 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20160505/c2a88ab5/attachment.bin>
More information about the Libc-alpha
mailing list