Skip to content

Commit

Permalink
Add mallinfo2 support
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-schievink committed Jun 10, 2021
1 parent ce5cee1 commit fbcf62b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/unix/linux_like/linux/gnu/mod.rs
Expand Up @@ -128,6 +128,19 @@ s! {
pub keepcost: ::c_int,
}

pub struct mallinfo2 {
pub arena: ::size_t,
pub ordblks: ::size_t,
pub smblks: ::size_t,
pub hblks: ::size_t,
pub hblkhd: ::size_t,
pub usmblks: ::size_t,
pub fsmblks: ::size_t,
pub uordblks: ::size_t,
pub fordblks: ::size_t,
pub keepcost: ::size_t,
}

pub struct nlmsghdr {
pub nlmsg_len: u32,
pub nlmsg_type: u16,
Expand Down Expand Up @@ -1281,6 +1294,7 @@ extern "C" {
) -> ::c_int;
pub fn sched_getcpu() -> ::c_int;
pub fn mallinfo() -> ::mallinfo;
pub fn mallinfo2() -> ::mallinfo2;
pub fn malloc_usable_size(ptr: *mut ::c_void) -> ::size_t;
pub fn getpwent_r(
pwd: *mut ::passwd,
Expand Down

0 comments on commit fbcf62b

Please sign in to comment.