Skip to content

Commit 6c9ef7e

Browse files
committed
test mimalloc
1 parent a96ba96 commit 6c9ef7e

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

Cargo.lock

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1658,6 +1658,24 @@ name = "memoffset"
16581658
version = "0.2.1"
16591659
source = "registry+https://github.com/rust-lang/crates.io-index"
16601660

1661+
[[package]]
1662+
name = "mimalloc-sys"
1663+
version = "0.1.1"
1664+
source = "registry+https://github.com/rust-lang/crates.io-index"
1665+
dependencies = [
1666+
"cmake 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)",
1667+
"fs_extra 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
1668+
"libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)",
1669+
]
1670+
1671+
[[package]]
1672+
name = "mimallocator"
1673+
version = "0.1.0"
1674+
source = "registry+https://github.com/rust-lang/crates.io-index"
1675+
dependencies = [
1676+
"mimalloc-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
1677+
]
1678+
16611679
[[package]]
16621680
name = "minifier"
16631681
version = "0.0.30"
@@ -2716,6 +2734,7 @@ name = "rustc-main"
27162734
version = "0.0.0"
27172735
dependencies = [
27182736
"jemalloc-sys 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
2737+
"mimallocator 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
27192738
"rustc_codegen_ssa 0.0.0",
27202739
"rustc_driver 0.0.0",
27212740
"rustc_target 0.0.0",
@@ -4544,6 +4563,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
45444563
"checksum memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2efc7bc57c883d4a4d6e3246905283d8dae951bb3bd32f49d6ef297f546e1c39"
45454564
"checksum memmap 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e2ffa2c986de11a9df78620c01eeaaf27d94d3ff02bf81bfcca953102dd0c6ff"
45464565
"checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3"
4566+
"checksum mimalloc-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ae9cb9de67a0bd7fb7a862ecbc0b5b5639f89977e53251b0b4e1ae5cca49a5dd"
4567+
"checksum mimallocator 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "04cf3838b419c4b3591f415a7827d874ad1a13fac4946bb6021be179a772e00a"
45474568
"checksum minifier 0.0.30 (registry+https://github.com/rust-lang/crates.io-index)" = "4c909e78edf61f3aa0dd2086da168cdf304329044bbf248768ca3d20253ec8c0"
45484569
"checksum miniz-sys 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "0300eafb20369952951699b68243ab4334f4b10a88f411c221d444b36c40e649"
45494570
"checksum miniz_oxide 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5ad30a47319c16cde58d0314f5d98202a80c9083b5f61178457403dfb14e509c"

src/rustc/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ name = "rustc_binary"
99
path = "rustc.rs"
1010

1111
[dependencies]
12+
mimallocator = "0.1.0"
13+
1214
rustc_target = { path = "../librustc_target" }
1315
rustc_driver = { path = "../librustc_driver" }
1416

src/rustc/rustc.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#[global_allocator]
2+
static ALLOC: mimallocator::Mimalloc = mimallocator::Mimalloc;
3+
14
fn main() {
25
// Pull in jemalloc when enabled.
36
//

0 commit comments

Comments
 (0)