diff --git a/.github/scripts/ci-setup-x86_64-apple-darwin.sh b/.github/scripts/ci-setup-aarch64-apple-darwin.sh similarity index 100% rename from .github/scripts/ci-setup-x86_64-apple-darwin.sh rename to .github/scripts/ci-setup-aarch64-apple-darwin.sh diff --git a/.github/scripts/ci-style.sh b/.github/scripts/ci-style.sh index 0482321b52..4c71edf6d5 100755 --- a/.github/scripts/ci-style.sh +++ b/.github/scripts/ci-style.sh @@ -13,10 +13,6 @@ if [[ $CLIPPY_VERSION == "clippy 0.1.72"* ]]; then export CARGO_INCREMENTAL=0 fi -if [[ $CLIPPY_VERSION == "clippy 0.1.77"* && $CARGO_BUILD_TARGET == "x86_64-apple-darwin" ]]; then - export SKIP_CLIPPY=1 -fi - # --- Check main crate --- if [[ $SKIP_CLIPPY == 1 ]]; then diff --git a/.github/workflows/merge-check.yml b/.github/workflows/merge-check.yml index 8dd53785e9..be33f7bfff 100644 --- a/.github/workflows/merge-check.yml +++ b/.github/workflows/merge-check.yml @@ -22,10 +22,10 @@ env: "check-api-migration-update", "minimal-tests-core/x86_64-unknown-linux-gnu/stable", "minimal-tests-core/i686-unknown-linux-gnu/stable", - "minimal-tests-core/x86_64-apple-darwin/stable", + "minimal-tests-core/aarch64-apple-darwin/stable", "style-check/x86_64-unknown-linux-gnu/stable", "style-check/i686-unknown-linux-gnu/stable", - "style-check/x86_64-apple-darwin/stable", + "style-check/aarch64-apple-darwin/stable", "extended-tests-openjdk / test", "extended-tests-v8", "extended-tests-jikesrvm", diff --git a/.github/workflows/minimal-tests-core.yml b/.github/workflows/minimal-tests-core.yml index 2a113ca850..cf453d5196 100644 --- a/.github/workflows/minimal-tests-core.yml +++ b/.github/workflows/minimal-tests-core.yml @@ -36,7 +36,7 @@ jobs: target: - { os: ubuntu-22.04, triple: x86_64-unknown-linux-gnu } - { os: ubuntu-22.04, triple: i686-unknown-linux-gnu } - - { os: macos-15, triple: x86_64-apple-darwin } + - { os: macos-15, triple: aarch64-apple-darwin } rust: ${{ fromJson(needs.setup-test-matrix.outputs.rust )}} name: minimal-tests-core/${{ matrix.target.triple }}/${{ matrix.rust }} @@ -87,7 +87,7 @@ jobs: target: - { os: ubuntu-22.04, triple: x86_64-unknown-linux-gnu } - { os: ubuntu-22.04, triple: i686-unknown-linux-gnu } - - { os: macos-15, triple: x86_64-apple-darwin } + - { os: macos-15, triple: aarch64-apple-darwin } rust: ${{ fromJson(needs.setup-test-matrix.outputs.rust )}} name: style-check/${{ matrix.target.triple }}/${{ matrix.rust }} diff --git a/Cargo.toml b/Cargo.toml index f96df1ec29..cd4df3b9c3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,9 +35,9 @@ itertools = "0.14.0" jemalloc-sys = { version = "0.5.3", features = ["disable_initial_exec_tls"], optional = true } lazy_static = "1.1" libc = "0.2" +libmimalloc-sys = { version = "0.1.43", features = ["extended"], optional = true } log = { version = "0.4", features = ["max_level_trace", "release_max_level_off"] } memoffset = "0.9" -mimalloc-sys = { version = "0.1.6", optional = true } # MMTk macros - we have to specify a version here in order to publish the crate, even though we use the dependency from a local path. mmtk-macros = { version="0.31.0", path = "macros/" } num_cpus = "1.8" @@ -238,7 +238,7 @@ vo_bit_access = [] # Group:malloc # only one of the following features should be enabled, or none to use the default malloc from libc # this does not replace the global Rust allocator, but provides these libraries for GC implementation -malloc_mimalloc = ["dep:mimalloc-sys"] +malloc_mimalloc = ["dep:libmimalloc-sys"] malloc_jemalloc = ["dep:jemalloc-sys"] # Use the native mimalloc allocator for malloc. This is not tested by me (Yi) yet, and it is only used to make sure that some code diff --git a/src/util/malloc/library.rs b/src/util/malloc/library.rs index 2177a06144..7796eb9f30 100644 --- a/src/util/malloc/library.rs +++ b/src/util/malloc/library.rs @@ -33,13 +33,13 @@ mod mimalloc { // Normal 4K page accounting pub const LOG_BYTES_IN_MALLOC_PAGE: u8 = crate::util::constants::LOG_BYTES_IN_PAGE; // ANSI C - pub use mimalloc_sys::{ + pub use libmimalloc_sys::{ mi_calloc as calloc, mi_free as free, mi_malloc as malloc, mi_realloc as realloc, }; // Posix - pub use mimalloc_sys::mi_posix_memalign as posix_memalign; + pub use libmimalloc_sys::mi_posix_memalign as posix_memalign; // GNU - pub use mimalloc_sys::mi_malloc_usable_size as malloc_usable_size; + pub use libmimalloc_sys::mi_usable_size as malloc_usable_size; } /// If no malloc lib is specified, use the libc implementation