Good memory allocator for data processing

Carlos O'Donell carlos@redhat.com
Wed May 6 18:30:21 GMT 2020


On 5/3/20 10:50 PM, Yubin Ruan wrote:
> Thanks for the information, but does it provide any configuration
> method, I mean, never return, instead of
> 
>         "However, if the top chunk in a heap - the portion adjacent to
> unmapped memory - becomes large enough, some of that memory may be
> unmapped and returned to the operating system"

Yes, see the glibc.malloc.mmap_max and glibc.malloc.trim_threshold.

You want to raise the mmap max so mmap is never used for single
allocations, since such allocations are always freed with munmap.

You want to raise the trim threshold so trimming never happens.

With those changes you'll never give memory back to the OS.

Does that answer your question?

-- 
Cheers,
Carlos.



More information about the Libc-help mailing list