1malloc_stats(3) Library Functions Manual malloc_stats(3)
2
3
4
6 malloc_stats - print memory allocation statistics
7
9 Standard C library (libc, -lc)
10
12 #include <malloc.h>
13
14 void malloc_stats(void);
15
17 The malloc_stats() function prints (on standard error) statistics about
18 memory allocated by malloc(3) and related functions. For each arena
19 (allocation area), this function prints the total amount of memory al‐
20 located and the total number of bytes consumed by in-use allocations.
21 (These two values correspond to the arena and uordblks fields retrieved
22 by mallinfo(3).) In addition, the function prints the sum of these two
23 statistics for all arenas, and the maximum number of blocks and bytes
24 that were ever simultaneously allocated using mmap(2).
25
27 For an explanation of the terms used in this section, see at‐
28 tributes(7).
29
30 ┌────────────────────────────────────────────┬───────────────┬─────────┐
31 │Interface │ Attribute │ Value │
32 ├────────────────────────────────────────────┼───────────────┼─────────┤
33 │malloc_stats() │ Thread safety │ MT-Safe │
34 └────────────────────────────────────────────┴───────────────┴─────────┘
35
37 GNU.
38
40 glibc 2.0.
41
43 More detailed information about memory allocations in the main arena
44 can be obtained using mallinfo(3).
45
47 mmap(2), mallinfo(3), malloc(3), malloc_info(3), mallopt(3)
48
49
50
51Linux man-pages 6.04 2023-03-30 malloc_stats(3)