This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Persistent malloc


On 11/08/2017 06:52 AM, Florian Weimer wrote:
On 11/07/2017 09:25 PM, Carlos O'Donell wrote:
I just managed to make a persistent malloc by replacing MORECORE. My init
routine opens a file and maps it to a huge space at a fixed address, then I
just ftruncate the file when somebody asks my MORECORE for more:

We are going to remove the MORECORE hook soon.  Newly compiled binaries will no longer call it.

You need to provide your own malloc if you want to change this behavior:

<https://www.gnu.org/software/libc/manual/html_node/Replacing-malloc.html>

Sorry, I managed to trigger a race condition in Thunderbird where it shows (and apparently quotes) the wrong message content. The initially quoted bits were written by Adrian May, not Carlos.

Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]