Question about freeing segments in non contiguous main_arena
Florian Weimer
fweimer@redhat.com
Tue May 5 16:48:23 GMT 2026
* Abhijit Ray Chaudhury:
> Hi Florian,
>
> Thanks a lot for your reply. When an application starts freeing memory
> and frees all the memory for one mmaped segment , where av->top
> currently points to , how av->top be adjusted ?
>
> My assumption is that if all the memory is freed by the application
> that belongs to main_arena , av->top should go back to the contiguous
> [heap] segment . This question pertains to the non-contiguous
> main_arena scenario .
I don't think this happens in the current implementation. I'm not aware
of any data structures maintained by the code that would readily support
this.
Thanks,
Florian
More information about the Libc-help
mailing list