Skip to content

Commit ac070f8

Browse files
committed
Added README
1 parent 084ad96 commit ac070f8

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
A drop-in global allocator wrapper around the [mimalloc](https://github.com/microsoft/mimalloc) allocator.
2+
Mimalloc is a general purpose, performance oriented allocator built by Microsoft.
3+
4+
## Usage
5+
```rust
6+
use mimalloc::MiMalloc;
7+
#[global_allocator]
8+
static GLOBAL: MiMalloc = MiMalloc;
9+
```
10+
11+
## Usage without secure mode
12+
By default this library builds mimalloc in safe-mode. This means that
13+
heap allocations are encrypted, but this results in a 3% increase in overhead.
14+
15+
In `Cargo.toml`:
16+
```rust
17+
[dependencies]
18+
mimalloc = { version = "*", features = ["no_secure"] }
19+
```

0 commit comments

Comments
 (0)