diff options
author | gnzlbg <gonzalobg88@gmail.com> | 2018-01-17 18:17:34 +0100 |
---|---|---|
committer | gnzlbg <gonzalobg88@gmail.com> | 2018-01-17 18:20:03 +0100 |
commit | a2c0da68c35d3760ff4dbdbe524aba8806fde67e (patch) | |
tree | 3bddcf1242158e65ecac30124ddc1bcdc5e761c5 /src | |
parent | 82188828e98de0d509dd43a367bd02cefb425eea (diff) | |
download | rust-libc-a2c0da68c35d3760ff4dbdbe524aba8806fde67e.tar.gz |
Adds Linux's mallinfo
Closes #901 .
Diffstat (limited to 'src')
-rw-r--r-- | src/unix/notbsd/linux/mod.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/unix/notbsd/linux/mod.rs b/src/unix/notbsd/linux/mod.rs index b737717d53..1ea6794cb6 100644 --- a/src/unix/notbsd/linux/mod.rs +++ b/src/unix/notbsd/linux/mod.rs @@ -463,6 +463,19 @@ s! { pub mnt_freq: ::c_int, pub mnt_passno: ::c_int, } + + pub struct mallinfo { + pub arena: ::c_int, + pub ordblks: ::c_int, + pub smblks: ::c_int, + pub hblks: ::c_int, + pub hblkhd: ::c_int, + pub usmblks: ::c_int, + pub fsmblks: ::c_int, + pub uordblks: ::c_int, + pub fordblks: ::c_int, + pub keepcost: ::c_int, + } } pub const ABDAY_1: ::nl_item = 0x20000; @@ -1482,6 +1495,7 @@ extern { nbytes: ::off64_t, flags: ::c_uint) -> ::c_int; pub fn getifaddrs(ifap: *mut *mut ::ifaddrs) -> ::c_int; pub fn freeifaddrs(ifa: *mut ::ifaddrs); + pub fn mallinfo() -> ::mallinfo; pub fn malloc_usable_size(ptr: *const ::c_void) -> ::size_t; pub fn mremap(addr: *mut ::c_void, len: ::size_t, |