summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-09-02 15:50:32 +0000
committerbors <bors@rust-lang.org>2018-09-02 15:50:32 +0000
commitb9a0e23e84d2ae5aa580838831206da64d6473cf (patch)
treebd3ff5b1a4fe70dfc2eb9288a8f31e84b0587767
parentac7201bc02346acd3bfd42c9ae0b226ea3f168ff (diff)
parenta9590b55905c5f07c415c23e85a79d2259354482 (diff)
downloadrust-libc-b9a0e23e84d2ae5aa580838831206da64d6473cf.tar.gz
Auto merge of #1071 - Lytigas:master, r=alexcrichton
Add mallopt First time contributor. Thanks for the excellent contributing guide. I'm not quite sure I put the method in the right place. [The GNULib docs](https://www.gnu.org/software/gnulib/manual/html_node/mallopt.html) say its not on Android 7.1, but there are [mentions of it in some android headers](https://android.googlesource.com/platform/bionic/+/master/libc/include/malloc.h).
-rw-r--r--src/unix/notbsd/linux/other/mod.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/unix/notbsd/linux/other/mod.rs b/src/unix/notbsd/linux/other/mod.rs
index 93b710b8df..8e32edf7a7 100644
--- a/src/unix/notbsd/linux/other/mod.rs
+++ b/src/unix/notbsd/linux/other/mod.rs
@@ -824,6 +824,19 @@ pub const NFT_TRACETYPE_RULE: ::c_int = 3;
pub const NFT_NG_INCREMENTAL: ::c_int = 0;
pub const NFT_NG_RANDOM: ::c_int = 1;
+pub const M_MXFAST: ::c_int = 1;
+pub const M_NLBLKS: ::c_int = 2;
+pub const M_GRAIN: ::c_int = 3;
+pub const M_KEEP: ::c_int = 4;
+pub const M_TRIM_THRESHOLD: ::c_int = -1;
+pub const M_TOP_PAD: ::c_int = -2;
+pub const M_MMAP_THRESHOLD: ::c_int = -3;
+pub const M_MMAP_MAX: ::c_int = -4;
+pub const M_CHECK_ACTION: ::c_int = -5;
+pub const M_PERTURB: ::c_int = -6;
+pub const M_ARENA_TEST: ::c_int = -7;
+pub const M_ARENA_MAX: ::c_int = -8;
+
#[doc(hidden)]
pub const AF_MAX: ::c_int = 42;
#[doc(hidden)]
@@ -856,6 +869,7 @@ extern {
pub fn setutxent();
pub fn endutxent();
pub fn getpt() -> ::c_int;
+ pub fn mallopt(param: ::c_int, value: ::c_int) -> ::c_int;
}
#[link(name = "util")]