summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Hejna <josh.hejna@gmail.com>2018-09-02 01:06:55 -0700
committerJosh Hejna <josh.hejna@gmail.com>2018-09-02 01:06:55 -0700
commit7192ecb2cd9b75a43f4ce8463526a04f8df9b944 (patch)
tree9dd6c069eb87faf753b7d56c3d9805487c8af137
parentac7201bc02346acd3bfd42c9ae0b226ea3f168ff (diff)
downloadrust-libc-7192ecb2cd9b75a43f4ce8463526a04f8df9b944.tar.gz
Add mallopt
-rw-r--r--src/unix/notbsd/linux/mod.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/unix/notbsd/linux/mod.rs b/src/unix/notbsd/linux/mod.rs
index 6bc7db191c..9f28dfd6ca 100644
--- a/src/unix/notbsd/linux/mod.rs
+++ b/src/unix/notbsd/linux/mod.rs
@@ -1576,6 +1576,20 @@ pub const ATF_MAGIC: ::c_int = 0x80;
pub const MODULE_INIT_IGNORE_MODVERSIONS: ::c_uint = 0x0001;
pub const MODULE_INIT_IGNORE_VERMAGIC: ::c_uint = 0x0002;
+// malloc.h
+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;
+
f! {
pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () {
for slot in cpuset.bits.iter_mut() {
@@ -2129,6 +2143,7 @@ extern {
nobj: ::size_t,
stream: *mut ::FILE
) -> ::size_t;
+ pub fn mallopt(param: ::c_int, value: ::c_int) -> ::c_int;
}
cfg_if! {