This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: Impact of Increasing M_MMAP_THRESHOLD to 1GB in malloc().
- From: Florian Weimer <fweimer at redhat dot com>
- To: ritesh sonawane <rdssonawane2317 at gmail dot com>
- Cc: libc-help at sourceware dot org
- Date: Wed, 26 Sep 2018 12:05:06 +0200
- Subject: Re: Impact of Increasing M_MMAP_THRESHOLD to 1GB in malloc().
- References: <CAB8f8h06rQaFC9jiYc2BpHpjDd=VLUtr0Li0EjJg=-pzYqC3Tw@mail.gmail.com>
* ritesh sonawane:
> I am working on system with page size 2MB and 64MB and use of malloc()
> leads to fragmentation.
What kind of fragmentation?
> To avoid this I want to increase the size of M_MMAP_THRESHOLD to
> 1GB. Is there any impact of this on bin index calculation ?
I assume this is for a 64-bit target.
You will also have to increase the heap size (the amount by which thread
arenas grow), otherwise you will end up with much more fragmenation for
certain allocation sizes. This will mean that every thread consumes at
least 2 GiB of address space.
Thanks,
Florian