|
From: | Paul Eggert |
Subject: | bug#22086: 25.1.50; [PATCH] Integrate the musl hybrid malloc patch for elf systems |
Date: | Mon, 21 Dec 2015 03:18:03 -0800 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 |
Eli Zaretskii wrote:
Wouldn't memory allocated with emallooc conflict with uses of malloc in the startup code?
It shouldn't conflict, as long as memory allocated by the system malloc is freed by the system free, and memory allocated with emalloc is freed by efree. If efree is the hybrid implementation, it'd even be OK to combine the system malloc with efree, or to combine emalloc with the system free in some cases. Unless I'm misunderstanding the question?
>Long ago as I recall, we really needed to override the C standard library on >some platforms, due to the funny way in which undumped storage was made >read-only. That need is obsolete, though, which should let us simplify things now.Why is it obsolete?
Formerly Emacs made both static storage and storage allocated via malloc read-only in the dumped Emacs, for efficiency reasons. As I recall, this required replacing the system malloc with gmalloc. This approach had a lot of problems though, and we stopped making that storage read-only a while ago.
[Prev in Thread] | Current Thread | [Next in Thread] |