Skip to content

Commit 9291f77

Browse files
marxintgross35
authored andcommitted
Add glibc's function: malloc_stats
The function is used to report stats about glibc's memory allocator to stderr: ``` Arena 0: system bytes = 1350406144 in use bytes = 3725633952 Arena 1: system bytes = 1895907328 in use bytes = 1653748608 Total (incl. mmap): system bytes = 277286912 in use bytes = 2410356000 max mmap regions = 56 max mmap bytes = 2876198912 ``` (backport <rust-lang#3596>) (cherry picked from commit 78e6d62)
1 parent 47467fc commit 9291f77

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

libc-test/semver/linux-gnu.txt

+1
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,7 @@ lio_listio
652652
mallinfo
653653
mallinfo2
654654
malloc_info
655+
malloc_stats
655656
malloc_trim
656657
malloc_usable_size
657658
mallopt

src/unix/linux_like/linux/gnu/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1494,6 +1494,7 @@ extern "C" {
14941494
pub fn pthread_sigqueue(thread: ::pthread_t, sig: ::c_int, value: ::sigval) -> ::c_int;
14951495
pub fn mallinfo() -> ::mallinfo;
14961496
pub fn mallinfo2() -> ::mallinfo2;
1497+
pub fn malloc_stats();
14971498
pub fn malloc_info(options: ::c_int, stream: *mut ::FILE) -> ::c_int;
14981499
pub fn malloc_usable_size(ptr: *mut ::c_void) -> ::size_t;
14991500
pub fn getpwent_r(

0 commit comments

Comments
 (0)