[PATCH] malloc: Remove dumped heap support

Sam James sam@gentoo.org
Tue Sep 16 18:39:56 GMT 2025


Adhemerval Zanella Netto <adhemerval.zanella@linaro.org> writes:

> On 30/07/25 06:33, Wilco Dijkstra wrote:
>> Hi Florian,
>> 
>>>> Remove support for obsolete dumped heaps.  Dumping heaps was discontinued
>>>> 8 years ago, however loading a dumped heap is still supported. This blocks
>>>> changes and improvements of the malloc data structures - hence it is time
>>>> to remove this.  Ancient binaries that still call malloc_set_state will now
>>>> get the -1 error code.  Update tst-mallocstate.c to just check for this.
>>>
>>> What are the improvements blocked by the heap rewriting?
>> 
>> Basically anything that changes the block layout and bit allocation in memory
>> is blocked by it. Even my minor change to mmap [1] was problematic since it
>> marks dumped heap blocks as mmaps and reuses the various mmap calls.
>> 
>> There is also a fundamental issue with the structure of the code - including
>> malloc.c repeatedly to be used in different contexts is a terrible design.
>> Getting rid of anything we don't strictly need that relies on malloc internals
>> makes it easier to improve malloc.
>> 
>> Cheers,
>> Wilco
>> 
>> [1] https://sourceware.org/pipermail/libc-alpha/2025-July/169025.html
>
> So I take that there is no blocker for this change, I need it only requires
> a NEWS entry on 'Deprecated and removed features'.
>
> Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

I'm afraid I object until the author replies wrt Emacs, and ideally
seeks some input from the Emacs ML.

(I'm not against the change by itself and I don't think we need to
support that indefinitely, I just don't think we can do it willynilly.)


More information about the Libc-alpha mailing list