From: Siddhesh Poyarekar <siddhesh@sourceware.org>
To: Michael Kerrisk <mtk.manpages@gmail.com>,
Carlos O'Donell <carlos@redhat.com>
Cc: libc-alpha <libc-alpha@sourceware.org>
Subject: Re: [PATCH 2/2] Document the M_ARENA_* mallopt parameters
Date: Tue, 18 Oct 2016 10:07:00 -0000 [thread overview]
Message-ID: <b0ebbcc6-6f65-8ec1-93e1-78a3522c3c46@sourceware.org> (raw)
In-Reply-To: <CALxWeYqD8EbdPPDT=9zh1ZW2z_egMDM_MvW35EDqXAqSq3osaw@mail.gmail.com>
On Tuesday 18 October 2016 12:45 PM, Michael Kerrisk wrote:
> So my reading from malloc/malloc.c:
>
> #define NARENAS_FROM_NCORES(n) ((n) * (sizeof (long) == 4 ? 2 : 8))
> .arena_test = NARENAS_FROM_NCORES (1)
>
> So, the default value for this parameter is 2 on systems where
> sizeof(long) is 4; otherwise the default value is 8.
That is correct.
> So, IIUC, the default value of this parameter is 0, meaning that there
> is no limit on the number of arenas that can be created. Do you
> confirm, Siddhesh?
No, the default is a function of the number of cores using the
NARENAS_FROM_NCORES macro. That is, 2 * (number of cores) where
sizeof(long) == 4 and 8 * (number of cores) otherwise. If the number of
cores is not available (i.e. we can't read this info for some reason)
then we default to 4 and 16 respectively, i.e. assume 2 cores.
Note that this default only comes into force once the number of arenas
cross arena_test.
> Siddhesh, in case you want to use any of my wordings (assuming they
> are correct), I place them in the public domain. (The text will also
> land in the mallopt(3) manual page.)
Thanks.
Siddhesh
next prev parent reply other threads:[~2016-10-18 10:07 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-10 17:26 [PATCH 1/2] Add note on MALLOC_MMAP_* environment variables Siddhesh Poyarekar
2016-10-10 17:26 ` [PATCH 2/2] Document the M_ARENA_* mallopt parameters Siddhesh Poyarekar
2016-10-17 14:04 ` [PING][PATCH " Siddhesh Poyarekar
2016-10-17 16:09 ` [PATCH " Carlos O'Donell
2016-10-18 7:15 ` Michael Kerrisk
2016-10-18 10:07 ` Siddhesh Poyarekar [this message]
2016-10-18 13:50 ` Michael Kerrisk (man-pages)
2016-10-18 14:30 ` Siddhesh Poyarekar
2016-10-18 16:03 ` Michael Kerrisk (man-pages)
2016-10-18 16:46 ` Siddhesh Poyarekar
2016-10-18 17:18 ` Andreas Schwab
2016-10-19 6:53 ` Michael Kerrisk (man-pages)
2016-10-19 7:09 ` Siddhesh Poyarekar
2016-10-10 17:33 ` [PATCH 1/2] Add note on MALLOC_MMAP_* environment variables DJ Delorie
2016-10-10 17:42 ` Siddhesh Poyarekar
2016-10-11 6:20 ` Michael Kerrisk
2016-10-11 18:19 ` DJ Delorie
2016-10-11 19:03 ` Michael Kerrisk (man-pages)
2016-10-12 11:57 ` Siddhesh Poyarekar
2016-10-17 19:40 ` Carlos O'Donell
2016-10-11 19:35 ` Kalle Olavi Niemitalo
2016-10-17 14:04 ` [PING][PATCH " Siddhesh Poyarekar
2016-10-17 16:13 ` [PATCH " Carlos O'Donell
2016-10-17 16:16 ` Siddhesh Poyarekar
2016-10-24 14:08 [PATCH 0/2] Malloc manual cleanups Siddhesh Poyarekar
2016-10-24 14:08 ` [PATCH 2/2] Document the M_ARENA_* mallopt parameters Siddhesh Poyarekar
2016-10-25 7:51 ` Rical Jasan
2016-10-25 21:55 ` DJ Delorie
2016-10-26 5:42 ` Siddhesh Poyarekar
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=b0ebbcc6-6f65-8ec1-93e1-78a3522c3c46@sourceware.org \
--to=siddhesh@sourceware.org \
--cc=carlos@redhat.com \
--cc=libc-alpha@sourceware.org \
--cc=mtk.manpages@gmail.com \
/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).