Skip to content

Commit d33766a

Browse files
committed
Augment mimalloc details.
1 parent cc80e88 commit d33766a

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

src/build-configuration.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,21 +136,31 @@ the [`tikv-jemallocator`] crate. To use it, add a dependency to your
136136
`Cargo.toml` file:
137137
```toml
138138
[dependencies]
139-
tikv-jemallocator = "0.5.0"
139+
tikv-jemallocator = "0.5"
140140
```
141141
Then add the following to your Rust code, e.g. at the top of `src/main.rs`:
142142
```rust,ignore
143143
#[global_allocator]
144144
static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
145145
```
146146
Another alternative allocator that works on many platforms is [mimalloc],
147-
usable via the [`mimalloc`] crate.
147+
usable via the [`mimalloc`] crate. To use it, add a dependency to your
148+
`Cargo.toml` file:
149+
```toml
150+
[dependencies]
151+
mimalloc = "0.1"
152+
```
153+
Then add the following to your Rust code, e.g. at the top of `src/main.rs`:
154+
```rust,ignore
155+
#[global_allocator]
156+
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
157+
```
148158

149159
[jemalloc]: https://github.com/jemalloc/jemalloc
150160
[`tikv-jemallocator`]: https://crates.io/crates/tikv-jemallocator
151161
[better performance]: https://github.com/rust-lang/rust/pull/83152
152162
[mimalloc]: https://github.com/microsoft/mimalloc
153-
[`mimalloc`]: https://docs.rs/mimalloc/0.1.22/mimalloc/
163+
[`mimalloc`]: https://crates.io/crates/mimalloc
154164

155165
### CPU Specific Instructions
156166

0 commit comments

Comments
 (0)