1MALLOC_STATS(3) Linux Programmer's Manual MALLOC_STATS(3)
2
3
4
6 malloc_stats - print memory allocation statistics
7
9 #include <malloc.h>
10
11 void malloc_stats(void);
12
14 The malloc_stats() function prints (on standard error) statistics about
15 memory allocated by malloc(3) and related functions. For each arena
16 (allocation area), this function prints the total amount of memory
17 allocated and the total number of bytes consumed by in-use allocations.
18 (These two values correspond to the arena and uordblks fields retrieved
19 by mallinfo(3).) In addition, the function prints the sum of these two
20 statistics for all arenas, and the maximum number of blocks and bytes
21 that were ever simultaneously allocated using mmap(2).
22
24 For an explanation of the terms used in this section, see
25 attributes(7).
26
27 ┌───────────────┬───────────────┬─────────┐
28 │Interface │ Attribute │ Value │
29 ├───────────────┼───────────────┼─────────┤
30 │malloc_stats() │ Thread safety │ MT-Safe │
31 └───────────────┴───────────────┴─────────┘
32
34 This function is a GNU extension.
35
37 More detailed information about memory allocations in the main arena
38 can be obtained using mallinfo(3).
39
41 mmap(2), mallinfo(3), malloc(3), malloc_info(3), mallopt(3)
42
44 This page is part of release 5.02 of the Linux man-pages project. A
45 description of the project, information about reporting bugs, and the
46 latest version of this page, can be found at
47 https://www.kernel.org/doc/man-pages/.
48
49
50
51Linux 2017-09-15 MALLOC_STATS(3)