summaryrefslogtreecommitdiff
path: root/manual/memory.texi
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@sourceware.org>2016-10-26 15:07:07 +0530
committerSiddhesh Poyarekar <siddhesh@sourceware.org>2016-10-26 15:07:07 +0530
commitaceb22c1f59231909777f7d0a6b955adbf7096a2 (patch)
treec2142a896b04f01fea607401fe06bd6aac0d8376 /manual/memory.texi
parentc1234e60f975da09764683cddff4ef7e2a21ce78 (diff)
Remove references to sbrk to grow/shrink arenas
The manual incorrectly references sbrk as the method used to grow and shrink heaps and the fact that M_TRIM_THRESHOLD and M_TOP_PAD control that behavior. In reality, a heap may be grown or shrunk through multiple methods depending on whether it is the main arena (in which case sbrk is correct) or not (in which case, there are a number of strategies including allocating an additional heap to grow an arena and/or 'mprotect' a region to make it available for allocation). Remove references to sbrk so that it covers the behavior more accurately. * manual/memory.texi (M_TOP_PAD): Remove reference to sbrk. (M_TRIM_THRESHOLD): Likewise.
Diffstat (limited to 'manual/memory.texi')
-rw-r--r--manual/memory.texi12
1 files changed, 5 insertions, 7 deletions
diff --git a/manual/memory.texi b/manual/memory.texi
index 4ad2c96393..b66de60210 100644
--- a/manual/memory.texi
+++ b/manual/memory.texi
@@ -1132,11 +1132,10 @@ This parameter can also be set for the process at startup by setting the
environment variable @env{MALLOC_MMAP_PERTURB_} to the desired value.
@item M_TOP_PAD
-This parameter determines the amount of extra memory to obtain from the
-system when a call to @code{sbrk} is required. It also specifies the
-number of bytes to retain when shrinking the heap by calling @code{sbrk}
-with a negative argument. This provides the necessary hysteresis in
-heap size such that excessive amounts of system calls can be avoided.
+This parameter determines the amount of extra memory to obtain from the system
+when an arena needs to be extended. It also specifies the number of bytes to
+retain when shrinking an arena. This provides the necessary hysteresis in heap
+size such that excessive amounts of system calls can be avoided.
The default value of this parameter is @code{0}.
@@ -1145,8 +1144,7 @@ environment variable @env{MALLOC_TOP_PAD_} to the desired value.
@item M_TRIM_THRESHOLD
This is the minimum size (in bytes) of the top-most, releasable chunk
-that will cause @code{sbrk} to be called with a negative argument in
-order to return memory to the system.
+that will trigger a system call in order to return memory to the system.
If this parameter is not set, the default value is set as 128 KiB and the
threshold is adjusted dynamically to suit the allocation patterns of the