summaryrefslogtreecommitdiffstats
path: root/man3/mallopt.3
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:41:07 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:41:07 +0000
commit3af6d22bb3850ab2bac67287e3a3d3b0e32868e5 (patch)
tree3ee7a3ec64525911fa865bb984c86d997d855527 /man3/mallopt.3
parentAdding debian version 6.05.01-1. (diff)
downloadmanpages-3af6d22bb3850ab2bac67287e3a3d3b0e32868e5.tar.xz
manpages-3af6d22bb3850ab2bac67287e3a3d3b0e32868e5.zip
Merging upstream version 6.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'man3/mallopt.3')
-rw-r--r--man3/mallopt.328
1 files changed, 14 insertions, 14 deletions
diff --git a/man3/mallopt.3 b/man3/mallopt.3
index 5fdda5c..6922b0f 100644
--- a/man3/mallopt.3
+++ b/man3/mallopt.3
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH mallopt 3 2023-05-03 "Linux man-pages 6.05.01"
+.TH mallopt 3 2024-02-26 "Linux man-pages 6.7"
.SH NAME
mallopt \- set memory allocation parameters
.SH LIBRARY
@@ -11,7 +11,7 @@ Standard C library
.SH SYNOPSIS
.nf
.B #include <malloc.h>
-.PP
+.P
.BI "int mallopt(int " param ", int " value );
.fi
.SH DESCRIPTION
@@ -25,7 +25,7 @@ The
argument specifies the parameter to be modified, and
.I value
specifies the new value for that parameter.
-.PP
+.P
The following values can be specified for
.IR param :
.TP
@@ -355,7 +355,7 @@ then the
settings take precedence.)
For security reasons,
these variables are ignored in set-user-ID and set-group-ID programs.
-.PP
+.P
The environment variables are as follows
(note the trailing underscore at the end of the name of some variables):
.TP
@@ -455,7 +455,7 @@ glibc 2.0.
Specifying an invalid value for
.I param
does not generate an error.
-.PP
+.P
A calculation error within the glibc implementation means that
a call of the form:
.\" FIXME . This looks buggy:
@@ -463,13 +463,13 @@ a call of the form:
.\" malloc requests are rounded up:
.\" (req) + SIZE_SZ + MALLOC_ALIGN_MASK) & ~MALLOC_ALIGN_MASK
.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=12129
-.PP
+.P
.in +4n
.EX
mallopt(M_MXFAST, n)
.EE
.in
-.PP
+.P
does not result in fastbins being employed for all allocations of size up to
.IR n .
To ensure desired results,
@@ -480,7 +480,7 @@ where
.I k
is an integer.
.\" Bins are multiples of 2 * sizeof(size_t) + sizeof(size_t)
-.PP
+.P
If
.BR mallopt ()
is used to set
@@ -510,11 +510,11 @@ then that argument is used to set the
parameter.
The program then allocates a block of memory,
and frees it twice (an error).
-.PP
+.P
The following shell session shows what happens when we run this program
under glibc, with the default value for
.BR M_CHECK_ACTION :
-.PP
+.P
.in +4n
.EX
$ \fB./a.out\fP
@@ -536,10 +536,10 @@ bff53000\-bff74000 rw\-p 00000000 00:00 0 [stack]
Aborted (core dumped)
.EE
.in
-.PP
+.P
The following runs show the results when employing other values for
.BR M_CHECK_ACTION :
-.PP
+.P
.in +4n
.EX
$ \fB./a.out 1\fP # Diagnose error and continue
@@ -554,11 +554,11 @@ main(): returned from first free() call
main(): returned from second free() call
.EE
.in
-.PP
+.P
The next run shows how to set the same parameter using the
.B MALLOC_CHECK_
environment variable:
-.PP
+.P
.in +4n
.EX
$ \fBMALLOC_CHECK_=1 ./a.out\fP