]>
Commit | Line | Data |
---|---|---|
a1eaacb1 | 1 | '\" t |
067568db MK |
2 | .\" Copyright (c) 2012 by Michael Kerrisk <mtk.manpages@gmail.com> |
3 | .\" | |
5fbde956 | 4 | .\" SPDX-License-Identifier: Linux-man-pages-copyleft |
067568db | 5 | .\" |
4c1c5274 | 6 | .TH malloc_stats 3 (date) "Linux man-pages (unreleased)" |
067568db MK |
7 | .SH NAME |
8 | malloc_stats \- print memory allocation statistics | |
cf79e286 AC |
9 | .SH LIBRARY |
10 | Standard C library | |
8fc3b2cf | 11 | .RI ( libc ", " \-lc ) |
067568db | 12 | .SH SYNOPSIS |
c7db92b9 | 13 | .nf |
067568db | 14 | .B #include <malloc.h> |
dbfe9c70 | 15 | .PP |
067568db | 16 | .B void malloc_stats(void); |
c7db92b9 | 17 | .fi |
067568db MK |
18 | .SH DESCRIPTION |
19 | The | |
20 | .BR malloc_stats () | |
21 | function prints (on standard error) statistics about memory allocated by | |
22 | .BR malloc (3) | |
23 | and related functions. | |
24 | For each arena (allocation area), this function prints | |
1da7358e | 25 | the total amount of memory allocated |
067568db MK |
26 | and the total number of bytes consumed by in-use allocations. |
27 | (These two values correspond to the | |
28 | .I arena | |
29 | and | |
30 | .I uordblks | |
31 | fields retrieved by | |
32 | .BR mallinfo (3).) | |
33 | In addition, | |
34 | the function prints the sum of these two statistics for all arenas, | |
35 | and the maximum number of blocks and bytes that were ever simultaneously | |
36 | allocated using | |
37 | .BR mmap (2). | |
72dd4c2f ZL |
38 | .SH ATTRIBUTES |
39 | For an explanation of the terms used in this section, see | |
40 | .BR attributes (7). | |
41 | .TS | |
42 | allbox; | |
c466875e | 43 | lbx lb lb |
72dd4c2f ZL |
44 | l l l. |
45 | Interface Attribute Value | |
46 | T{ | |
9e54434e BR |
47 | .na |
48 | .nh | |
72dd4c2f ZL |
49 | .BR malloc_stats () |
50 | T} Thread safety MT-Safe | |
51 | .TE | |
847e0d88 | 52 | .sp 1 |
3113c7f3 | 53 | .SH STANDARDS |
4131356c AC |
54 | GNU. |
55 | .SH HISTORY | |
56 | glibc 2.0. | |
067568db MK |
57 | .SH NOTES |
58 | More detailed information about memory allocations in the main arena | |
59 | can be obtained using | |
60 | .BR mallinfo (3). | |
61 | .SH SEE ALSO | |
62 | .BR mmap (2), | |
63 | .BR mallinfo (3), | |
64 | .BR malloc (3), | |
65 | .BR malloc_info (3), | |
66 | .BR mallopt (3) |