From: Patrick McGehearty <patrick.mcgehearty@oracle.com>
To: DJ Delorie <dj@redhat.com>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH v2] Remove upper limit on tunable MALLOC_MMAP_THRESHOLD
Date: Tue, 9 Nov 2021 16:33:11 -0600 [thread overview]
Message-ID: <03e480f8-c6c5-3247-5726-8982b02123af@oracle.com> (raw)
In-Reply-To: <xntugv8krf.fsf@greed.delorie.com>
If a chunk smaller than the mmap_threshold is requested,
then MORECORE [typically sbrk()] is called and HEAP_MAX
is not considered by the malloc code. Heaps are only used
for mmap()ed allocations, not sbrk()'ed allocations,
so far as I can tell in reading the code.
Setting a higher default HEAP_MAX would mean the main arena
would by default be larger which might cause issues for
applications with many, many threads. For that reason,
I did not consider changing the default HEAP_MAX as part
of this patch.
It might be desirable to also allow HEAP_MAX to be set by
the user before the first call to malloc, but I see that
as a separate task.
- patrick
On 11/1/2021 7:27 PM, DJ Delorie wrote:
> If mmap_threshold is greater than heap_max, what happens when you
> allocate a chunk between those two sizes?
>
next prev parent reply other threads:[~2021-11-09 22:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-01 21:48 Patrick McGehearty
2021-11-02 0:27 ` DJ Delorie
2021-11-09 22:33 ` Patrick McGehearty [this message]
2021-11-10 0:36 ` DJ Delorie
2021-11-25 0:52 ` Patrick McGehearty
2021-11-29 20:42 ` DJ Delorie
2021-11-29 21:35 ` Patrick McGehearty
2021-12-07 19:51 ` Patrick McGehearty
2021-12-07 20:35 ` DJ Delorie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=03e480f8-c6c5-3247-5726-8982b02123af@oracle.com \
--to=patrick.mcgehearty@oracle.com \
--cc=dj@redhat.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).