mirror of https://github.com/mkerrisk/man-pages
mallopt.3: Minor tweaks to Carlos's patch
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
9d116bd272
commit
bb1ee72e6f
|
@ -46,34 +46,48 @@ The following values can be specified for
|
||||||
.IR param :
|
.IR param :
|
||||||
.TP
|
.TP
|
||||||
.BR M_ARENA_MAX
|
.BR M_ARENA_MAX
|
||||||
is the maximum number of arenas that can be created. The value of
|
This is the maximum number of arenas that can be created.
|
||||||
M_ARENA_TEST is not used when M_ARENA_MAX is defined.
|
The value of
|
||||||
An arena represents a pool of memory that can be used by malloc
|
.B M_ARENA_TEST
|
||||||
calls to service allocation requests. Arenas are thread safe and
|
is not used when
|
||||||
therefore may have multiple concurrent memory requests. The
|
.B M_ARENA_MAX
|
||||||
trade-off is between number of threads and number of arenas.
|
is defined.
|
||||||
The more arenas you have the lower the per-thread contention,
|
An arena represents a pool of memory that can be used by
|
||||||
|
.BR malloc (3)
|
||||||
|
(and similar) calls to service allocation requests.
|
||||||
|
Arenas are thread safe and
|
||||||
|
therefore may have multiple concurrent memory requests.
|
||||||
|
The trade-off is between the number of threads and the number of arenas.
|
||||||
|
The more arenas you have, the lower the per-thread contention,
|
||||||
but the higher the memory usage.
|
but the higher the memory usage.
|
||||||
This parameter has been available since glibc 2.10 via
|
This parameter has been available since glibc 2.10 via
|
||||||
--enable-experimental-malloc, or glibc 2.15 by default.
|
.BR \-\-enable\-experimental\-malloc ,
|
||||||
|
and since glibc 2.15 by default.
|
||||||
In some versions of the allocator there was no limit on the number
|
In some versions of the allocator there was no limit on the number
|
||||||
of created arenas e.g. CentOS 5, RHEL 5. When running programs on
|
of created arenas (e.g., CentOS 5, RHEL 5).
|
||||||
newer glibc these applications may exhibit high contention when
|
|
||||||
accessing arenas. In these cases it may be beneficial to increase
|
When running programs on newer glibc versions,
|
||||||
M_ARENA_MAX to match the number of threads. This is similar in behaviour
|
these applications may exhibit high contention when accessing arenas.
|
||||||
to strategies taken by tcmalloc and jemalloc e.g. per-thread allocation
|
In these cases, it may be beneficial to increase
|
||||||
pools.
|
.B M_ARENA_MAX
|
||||||
|
to match the number of threads.
|
||||||
|
This is similar in behavior to strategies taken by tcmalloc and jemalloc
|
||||||
|
(e.g., per-thread allocation pools).
|
||||||
.TP
|
.TP
|
||||||
.BR M_ARENA_TEST
|
.BR M_ARENA_TEST
|
||||||
is the limit, in number of arenas created, at which the system
|
This is the limit, in number of arenas created, at which the system
|
||||||
configuration will be examined to evaluate a hard limit on the
|
configuration will be examined to evaluate a hard limit on the
|
||||||
number of created arenas. The computed limit is implementation
|
number of created arenas.
|
||||||
defined and usually a multiple of the number of available cores.
|
The computed limit is implementation-defined
|
||||||
Once the limit is computed the result is final and constrains
|
and is usually a multiple of the number of available cores.
|
||||||
|
Once the limit is computed, the result is final and constrains
|
||||||
the total number of arenas.
|
the total number of arenas.
|
||||||
See M_ARENA_MAX for the definition of an arena.
|
See
|
||||||
|
.B M_ARENA_MAX
|
||||||
|
for the definition of an arena.
|
||||||
This parameter has been available since glibc 2.10 via
|
This parameter has been available since glibc 2.10 via
|
||||||
--enable-experimental-malloc, or glibc 2.15 by default.
|
.BR \-\-enable\-experimental\-malloc ,
|
||||||
|
and since glibc 2.15 by default.
|
||||||
.TP
|
.TP
|
||||||
.BR M_CHECK_ACTION
|
.BR M_CHECK_ACTION
|
||||||
Setting this parameter controls how glibc responds when various kinds
|
Setting this parameter controls how glibc responds when various kinds
|
||||||
|
|
Loading…
Reference in New Issue