summaryrefslogtreecommitdiffstats
path: root/man3/mallopt.3
diff options
context:
space:
mode:
Diffstat (limited to 'man3/mallopt.3')
-rw-r--r--man3/mallopt.368
1 files changed, 34 insertions, 34 deletions
diff --git a/man3/mallopt.3 b/man3/mallopt.3
index 8308203ae..10f1c5dd0 100644
--- a/man3/mallopt.3
+++ b/man3/mallopt.3
@@ -19,7 +19,7 @@ The
.BR mallopt ()
function adjusts parameters that control the behavior of the
memory-allocation functions (see
-.BR malloc (3)).
+.MR malloc 3 ).
The
.I param
argument specifies the parameter to be modified, and
@@ -33,7 +33,7 @@ The following values can be specified for
If this parameter has a nonzero value,
it defines a hard limit on the maximum number of arenas that can be created.
An arena represents a pool of memory that can be used by
-.BR malloc (3)
+.MR malloc 3
(and similar) calls to service allocation requests.
Arenas are thread safe and
therefore may have multiple concurrent memory requests.
@@ -110,16 +110,16 @@ Bit 1
If this bit is set, then,
after printing any error message specified by bit 0,
the program is terminated by calling
-.BR abort (3).
+.MR abort 3 .
Since glibc 2.4,
if bit 0 is also set,
then, between printing the error message and aborting,
the program also prints a stack trace in the manner of
-.BR backtrace (3),
+.MR backtrace 3 ,
and prints the process's memory mapping in the style of
.IR /proc/ pid /maps
(see
-.BR proc (5)).
+.MR proc 5 ).
.TP
Bit 2 (since glibc 2.4)
This bit has an effect only if bit 0 is also set.
@@ -173,17 +173,17 @@ and the true cause of the problem is then very hard to track down.
.\" The following text adapted from comments in the glibc source:
This parameter specifies the maximum number of allocation requests that
may be simultaneously serviced using
-.BR mmap (2).
+.MR mmap 2 .
This parameter exists because some systems have a limited number
of internal tables for use by
-.BR mmap (2),
+.MR mmap 2 ,
and using more than a few of them may degrade performance.
.IP
The default value is 65,536,
a value which has no special significance and
which serves only as a safeguard.
Setting this parameter to 0 disables the use of
-.BR mmap (2)
+.MR mmap 2
for servicing large allocation requests.
.TP
.B M_MMAP_THRESHOLD
@@ -191,26 +191,26 @@ For allocations greater than or equal to the limit specified (in bytes) by
.B M_MMAP_THRESHOLD
that can't be satisfied from the free list,
the memory-allocation functions employ
-.BR mmap (2)
+.MR mmap 2
instead of increasing the program break using
-.BR sbrk (2).
+.MR sbrk 2 .
.IP
Allocating memory using
-.BR mmap (2)
+.MR mmap 2
has the significant advantage that the allocated memory blocks
can always be independently released back to the system.
(By contrast,
the heap can be trimmed only if memory is freed at the top end.)
On the other hand, there are some disadvantages to the use of
-.BR mmap (2):
+.MR mmap 2 :
deallocated space is not placed on the free list
for reuse by later allocations;
memory may be wasted because
-.BR mmap (2)
+.MR mmap 2
allocations must be page-aligned;
and the kernel must perform the expensive task of zeroing out
memory allocated via
-.BR mmap (2).
+.MR mmap 2 .
Balancing these factors leads to a default setting of 128*1024 for the
.B M_MMAP_THRESHOLD
parameter.
@@ -264,12 +264,12 @@ to 0 disables the use of fastbins.
.BR M_PERTURB " (since glibc 2.4)"
If this parameter is set to a nonzero value,
then bytes of allocated memory (other than allocations via
-.BR calloc (3))
+.MR calloc 3 )
are initialized to the complement of the value
in the least significant byte of
.IR value ,
and when allocated memory is released using
-.BR free (3),
+.MR free 3 ,
the freed bytes are set to the least significant byte of
.IR value .
This can be useful for detecting errors where programs
@@ -280,7 +280,7 @@ The default value for this parameter is 0.
.TP
.B M_TOP_PAD
This parameter defines the amount of padding to employ when calling
-.BR sbrk (2)
+.MR sbrk 2
to modify the program break.
(The measurement unit for this parameter is bytes.)
This parameter has an effect in the following circumstances:
@@ -289,11 +289,11 @@ This parameter has an effect in the following circumstances:
When the program break is increased, then
.B M_TOP_PAD
bytes are added to the
-.BR sbrk (2)
+.MR sbrk 2
request.
.IP \[bu]
When the heap is trimmed as a consequence of calling
-.BR free (3)
+.MR free 3
(see the discussion of
.BR M_TRIM_THRESHOLD )
this much free space is preserved at the top of the heap.
@@ -315,9 +315,9 @@ The default value for this parameter is 128*1024.
.B M_TRIM_THRESHOLD
When the amount of contiguous free memory at the top of the heap
grows sufficiently large,
-.BR free (3)
+.MR free 3
employs
-.BR sbrk (2)
+.MR sbrk 2
to release this memory back to the system.
(This can be useful in programs that continue to execute for
a long period after freeing a significant amount of memory.)
@@ -325,7 +325,7 @@ The
.B M_TRIM_THRESHOLD
parameter specifies the minimum size (in bytes) that
this block of memory must reach before
-.BR sbrk (2)
+.MR sbrk 2
is used to trim the heap.
.IP
The default value for this parameter is 128*1024.
@@ -376,7 +376,7 @@ This environment variable controls the same parameter as
If this variable is set to a nonzero value,
then a special implementation of the memory-allocation functions is used.
(This is accomplished using the
-.BR malloc_hook (3)
+.MR malloc_hook 3
feature.)
This implementation performs additional error checking,
but is slower
@@ -606,14 +606,14 @@ main(int argc, char *argv[])
.SH SEE ALSO
.ad l
.nh
-.BR mmap (2),
-.BR sbrk (2),
-.BR mallinfo (3),
-.BR malloc (3),
-.BR malloc_hook (3),
-.BR malloc_info (3),
-.BR malloc_stats (3),
-.BR malloc_trim (3),
-.BR mcheck (3),
-.BR mtrace (3),
-.BR posix_memalign (3)
+.MR mmap 2 ,
+.MR sbrk 2 ,
+.MR mallinfo 3 ,
+.MR malloc 3 ,
+.MR malloc_hook 3 ,
+.MR malloc_info 3 ,
+.MR malloc_stats 3 ,
+.MR malloc_trim 3 ,
+.MR mcheck 3 ,
+.MR mtrace 3 ,
+.MR posix_memalign 3