]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/malloc_stats.3
Many pages: Use correct letter case in page titles (TH)
[thirdparty/man-pages.git] / man3 / malloc_stats.3
1 .\" Copyright (c) 2012 by Michael Kerrisk <mtk.manpages@gmail.com>
2 .\"
3 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
4 .\"
5 .TH malloc_stats 3 (date) "Linux man-pages (unreleased)"
6 .SH NAME
7 malloc_stats \- print memory allocation statistics
8 .SH LIBRARY
9 Standard C library
10 .RI ( libc ", " \-lc )
11 .SH SYNOPSIS
12 .nf
13 .B #include <malloc.h>
14 .PP
15 .B void malloc_stats(void);
16 .fi
17 .SH DESCRIPTION
18 The
19 .BR malloc_stats ()
20 function prints (on standard error) statistics about memory allocated by
21 .BR malloc (3)
22 and related functions.
23 For each arena (allocation area), this function prints
24 the total amount of memory allocated
25 and the total number of bytes consumed by in-use allocations.
26 (These two values correspond to the
27 .I arena
28 and
29 .I uordblks
30 fields retrieved by
31 .BR mallinfo (3).)
32 In addition,
33 the function prints the sum of these two statistics for all arenas,
34 and the maximum number of blocks and bytes that were ever simultaneously
35 allocated using
36 .BR mmap (2).
37 .\" .SH VERSIONS
38 .\" Available already in glibc 2.0, possibly earlier
39 .SH ATTRIBUTES
40 For an explanation of the terms used in this section, see
41 .BR attributes (7).
42 .ad l
43 .nh
44 .TS
45 allbox;
46 lbx lb lb
47 l l l.
48 Interface Attribute Value
49 T{
50 .BR malloc_stats ()
51 T} Thread safety MT-Safe
52 .TE
53 .hy
54 .ad
55 .sp 1
56 .SH STANDARDS
57 This function is a GNU extension.
58 .SH NOTES
59 More detailed information about memory allocations in the main arena
60 can be obtained using
61 .BR mallinfo (3).
62 .SH SEE ALSO
63 .BR mmap (2),
64 .BR mallinfo (3),
65 .BR malloc (3),
66 .BR malloc_info (3),
67 .BR mallopt (3)