Skip to content

Commit b9a0e23

Browse files
committed
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).
2 parents ac7201b + a9590b5 commit b9a0e23

File tree

1 file changed

+14
-0
lines changed
  • src/unix/notbsd/linux/other

1 file changed

+14
-0
lines changed

src/unix/notbsd/linux/other/mod.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -824,6 +824,19 @@ pub const NFT_TRACETYPE_RULE: ::c_int = 3;
824824
pub const NFT_NG_INCREMENTAL: ::c_int = 0;
825825
pub const NFT_NG_RANDOM: ::c_int = 1;
826826

827+
pub const M_MXFAST: ::c_int = 1;
828+
pub const M_NLBLKS: ::c_int = 2;
829+
pub const M_GRAIN: ::c_int = 3;
830+
pub const M_KEEP: ::c_int = 4;
831+
pub const M_TRIM_THRESHOLD: ::c_int = -1;
832+
pub const M_TOP_PAD: ::c_int = -2;
833+
pub const M_MMAP_THRESHOLD: ::c_int = -3;
834+
pub const M_MMAP_MAX: ::c_int = -4;
835+
pub const M_CHECK_ACTION: ::c_int = -5;
836+
pub const M_PERTURB: ::c_int = -6;
837+
pub const M_ARENA_TEST: ::c_int = -7;
838+
pub const M_ARENA_MAX: ::c_int = -8;
839+
827840
#[doc(hidden)]
828841
pub const AF_MAX: ::c_int = 42;
829842
#[doc(hidden)]
@@ -856,6 +869,7 @@ extern {
856869
pub fn setutxent();
857870
pub fn endutxent();
858871
pub fn getpt() -> ::c_int;
872+
pub fn mallopt(param: ::c_int, value: ::c_int) -> ::c_int;
859873
}
860874

861875
#[link(name = "util")]

0 commit comments

Comments
 (0)