Skip to content

Commit 26fc715

Browse files
committed
Fixed CI testing
This commit should solve the CI errors. - Using `ctest2` instead of `ctest` which has not been updated for a while - Fixed extended feature because `mi_option_reserve_huge_os_pages_at` was added
1 parent 5a33939 commit 26fc715

File tree

4 files changed

+23
-16
lines changed

4 files changed

+23
-16
lines changed

libmimalloc-sys/src/extended.rs

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -512,11 +512,18 @@ pub const mi_option_large_os_pages: mi_option_t = 6;
512512
/// allocate just a little to take up space in the huge OS page area (which cannot be reset).
513513
pub const mi_option_reserve_huge_os_pages: mi_option_t = 7;
514514

515-
/// TODO: update later
516-
pub const mi_option_reserve_os_memory: mi_option_t = 8;
515+
/// Option (experimental) reserve huge OS pages at a specific NUMA node
516+
///
517+
/// The huge pages are usually allocated evenly among NUMA nodes.
518+
/// You can use mi_option_reserve_huge_os_pages_at=N where `N` is the numa node (starting at 0) to allocate all
519+
/// the huge pages at a specific numa node instead.
520+
pub const mi_option_reserve_huge_os_pages_at: mi_option_t = 8;
521+
522+
/// Option (experimental) reserve specified amount of OS memory at startup
523+
pub const mi_option_reserve_os_memory: mi_option_t = 9;
517524

518525
/// Option (experimental) specifying number of segments per thread to keep cached.
519-
pub const mi_option_segment_cache: mi_option_t = 9;
526+
pub const mi_option_segment_cache: mi_option_t = 10;
520527

521528
/// Option (experimental) to reset page memory after mi_option_reset_delay milliseconds when it becomes free.
522529
///
@@ -528,19 +535,19 @@ pub const mi_option_segment_cache: mi_option_t = 9;
528535
/// off completely.
529536
///
530537
/// Default: 1 (true)
531-
pub const mi_option_page_reset: mi_option_t = 10;
538+
pub const mi_option_page_reset: mi_option_t = 11;
532539

533540
/// Experimental
534-
pub const mi_option_abandoned_page_reset: mi_option_t = 11;
541+
pub const mi_option_abandoned_page_reset: mi_option_t = 12;
535542

536543
/// Experimental
537-
pub const mi_option_segment_reset: mi_option_t = 12;
544+
pub const mi_option_segment_reset: mi_option_t = 13;
538545

539546
/// Experimental
540-
pub const mi_option_eager_commit_delay: mi_option_t = 13;
547+
pub const mi_option_eager_commit_delay: mi_option_t = 14;
541548

542549
/// Option (experimental) specifying delay in milli-seconds before resetting a page (100ms by default).
543-
pub const mi_option_reset_delay: mi_option_t = 14;
550+
pub const mi_option_reset_delay: mi_option_t = 15;
544551

545552
/// Option (experimental) to pretend there are at most N NUMA nodes.
546553
///
@@ -549,19 +556,19 @@ pub const mi_option_reset_delay: mi_option_t = 14;
549556
/// actual NUMA nodes is fine and will only cause threads to potentially allocate more
550557
/// memory across actual NUMA nodes (but this can happen in any case as NUMA local
551558
/// allocation is always a best effort but not guaranteed).
552-
pub const mi_option_use_numa_nodes: mi_option_t = 15;
559+
pub const mi_option_use_numa_nodes: mi_option_t = 16;
553560

554561
/// TODO: update later
555-
pub const mi_option_limit_os_alloc: mi_option_t = 16;
562+
pub const mi_option_limit_os_alloc: mi_option_t = 17;
556563

557564
/// Option (experimental) specifying OS tag to assign to mimalloc'd memory.
558-
pub const mi_option_os_tag: mi_option_t = 17;
565+
pub const mi_option_os_tag: mi_option_t = 18;
559566

560567
/// Experimental
561-
pub const mi_option_max_errors: mi_option_t = 18;
568+
pub const mi_option_max_errors: mi_option_t = 19;
562569

563570
/// Experimental
564-
pub const mi_option_max_warnings: mi_option_t = 19;
571+
pub const mi_option_max_warnings: mi_option_t = 20;
565572

566573
extern "C" {
567574
// Note: mi_option_{enable,disable} aren't exposed because they're redundant

libmimalloc-sys/sys-test/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ libmimalloc-sys = { path = "..", features = ["extended"] }
1212
libc = "0.2"
1313

1414
[build-dependencies]
15-
ctest = "0.2"
15+
ctest2 = "0.4"

libmimalloc-sys/sys-test/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
fn main() {
2-
let mut cfg = ctest::TestGenerator::new();
2+
let mut cfg = ctest2::TestGenerator::new();
33
cfg.header("mimalloc.h")
44
.include(concat!(
55
env!("CARGO_MANIFEST_DIR"),

libmimalloc-sys/sys-test/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![allow(bad_style, clippy::all)]
1+
#![allow(bad_style, deprecated, clippy::all)]
22

33
use libmimalloc_sys::*;
44

0 commit comments

Comments
 (0)