From 3af6d22bb3850ab2bac67287e3a3d3b0e32868e5 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 21:41:07 +0200 Subject: Merging upstream version 6.7. Signed-off-by: Daniel Baumann --- man3/malloc_info.3 | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'man3/malloc_info.3') diff --git a/man3/malloc_info.3 b/man3/malloc_info.3 index 045430b..9df31cf 100644 --- a/man3/malloc_info.3 +++ b/man3/malloc_info.3 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH malloc_info 3 2023-07-20 "Linux man-pages 6.05.01" +.TH malloc_info 3 2024-02-26 "Linux man-pages 6.7" .SH NAME malloc_info \- export malloc state to a stream .SH LIBRARY @@ -12,7 +12,7 @@ Standard C library .SH SYNOPSIS .nf .B #include -.PP +.P .BI "int malloc_info(int " options ", FILE *" stream ); .fi .SH DESCRIPTION @@ -25,7 +25,7 @@ The string is printed on the file stream .IR stream . The exported string includes information about all arenas (see .BR malloc (3)). -.PP +.P As currently implemented, .I options must be zero. @@ -55,7 +55,6 @@ T{ .BR malloc_info () T} Thread safety MT-Safe .TE -.sp 1 .SH STANDARDS GNU. .SH HISTORY @@ -66,13 +65,13 @@ The memory-allocation information is provided as an XML string because the information may change over time (according to changes in the underlying implementation). The output XML string includes a version field. -.PP +.P The .BR open_memstream (3) function can be used to send the output of .BR malloc_info () directly into a buffer in memory, rather than to a file. -.PP +.P The .BR malloc_info () function is designed to address deficiencies in @@ -90,14 +89,14 @@ The third argument controls the size of the blocks to be allocated. The main thread creates blocks of this size, the second thread created by the program allocates blocks of twice this size, the third thread allocates blocks of three times this size, and so on. -.PP +.P The program calls .BR malloc_info () twice to display the memory-allocation state. The first call takes place before any threads are created or memory allocated. The second call is performed after all threads have allocated memory. -.PP +.P In the following example, the command-line arguments specify the creation of one additional thread, and both the main thread and the additional thread @@ -105,7 +104,7 @@ allocate 10000 blocks of memory. After the blocks of memory have been allocated, .BR malloc_info () shows the state of two allocation arenas. -.PP +.P .in +4n .EX .RB "$ " "getconf GNU_LIBC_VERSION" -- cgit v1.2.3