Skip to content

Commit 7192ecb

Browse files
committed
Add mallopt
1 parent ac7201b commit 7192ecb

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/unix/notbsd/linux/mod.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1576,6 +1576,20 @@ pub const ATF_MAGIC: ::c_int = 0x80;
15761576
pub const MODULE_INIT_IGNORE_MODVERSIONS: ::c_uint = 0x0001;
15771577
pub const MODULE_INIT_IGNORE_VERMAGIC: ::c_uint = 0x0002;
15781578

1579+
// malloc.h
1580+
pub const M_MXFAST: ::c_int = 1;
1581+
pub const M_NLBLKS: ::c_int = 2;
1582+
pub const M_GRAIN: ::c_int = 3;
1583+
pub const M_KEEP: ::c_int = 4;
1584+
pub const M_TRIM_THRESHOLD: ::c_int = -1;
1585+
pub const M_TOP_PAD: ::c_int = -2;
1586+
pub const M_MMAP_THRESHOLD: ::c_int = -3;
1587+
pub const M_MMAP_MAX: ::c_int = -4;
1588+
pub const M_CHECK_ACTION: ::c_int = -5;
1589+
pub const M_PERTURB: ::c_int = -6;
1590+
pub const M_ARENA_TEST: ::c_int = -7;
1591+
pub const M_ARENA_MAX: ::c_int = -8;
1592+
15791593
f! {
15801594
pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () {
15811595
for slot in cpuset.bits.iter_mut() {
@@ -2129,6 +2143,7 @@ extern {
21292143
nobj: ::size_t,
21302144
stream: *mut ::FILE
21312145
) -> ::size_t;
2146+
pub fn mallopt(param: ::c_int, value: ::c_int) -> ::c_int;
21322147
}
21332148

21342149
cfg_if! {

0 commit comments

Comments
 (0)