summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-01-08 19:04:09 +0000
committerbors <bors@rust-lang.org>2022-01-08 19:04:09 +0000
commit847f7174efdb209ff8f6755d116e398ad91bbf72 (patch)
treeeb136f84a5e3f8a3bc067456f42d068139ea74ee
parent1f1ebd5b8056b278f86ed6421f02c149bda9ae08 (diff)
parent95e74dd173038699a8f867f47d50999052c9fa83 (diff)
downloadrust-libc-847f7174efdb209ff8f6755d116e398ad91bbf72.tar.gz
Auto merge of #2618 - devnexen:linux_gnu_malloc_trim, r=Amanieu
linux GLIBC add malloc_trim fn.
-rw-r--r--libc-test/semver/linux-gnu.txt1
-rw-r--r--src/unix/linux_like/linux/gnu/mod.rs1
2 files changed, 2 insertions, 0 deletions
diff --git a/libc-test/semver/linux-gnu.txt b/libc-test/semver/linux-gnu.txt
index 3a7901aa41..f00fcaa107 100644
--- a/libc-test/semver/linux-gnu.txt
+++ b/libc-test/semver/linux-gnu.txt
@@ -595,6 +595,7 @@ lio_listio
mallinfo
mallinfo2
malloc_info
+malloc_trim
malloc_usable_size
mallopt
nl_mmap_hdr
diff --git a/src/unix/linux_like/linux/gnu/mod.rs b/src/unix/linux_like/linux/gnu/mod.rs
index 11aedf4aea..da7e9e4e9f 100644
--- a/src/unix/linux_like/linux/gnu/mod.rs
+++ b/src/unix/linux_like/linux/gnu/mod.rs
@@ -1431,6 +1431,7 @@ extern "C" {
extra_info: *mut *mut ::c_void,
flags: ::c_int,
) -> ::c_int;
+ pub fn malloc_trim(__pad: ::size_t) -> ::c_int;
}
cfg_if! {