Skip to content

Commit d0db6b3

Browse files
committed
README and authors
1 parent 14a54e2 commit d0db6b3

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
[package]
22
name = "mimalloc"
33
version = "0.1.2"
4-
authors = ["Octavian Oncescu <octavonce@gmail.com>"]
4+
authors = [
5+
"Octavian Oncescu <octavonce@gmail.com>",
6+
"Vincent Rouillé <vincent@speedy37.fr>",
7+
]
58
edition = "2018"
69
repository = "https://github.com/purpleprotocol/mimalloc_rust"
710
keywords = ["mimalloc", "allocator", "encrypted-heap", "performance"]

README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,30 @@
11
# Mimalloc Rust
2+
23
[![Build Status](https://travis-ci.org/purpleprotocol/mimalloc_rust.svg?branch=master)](https://travis-ci.org/purpleprotocol/mimalloc_rust) [![Latest Version]][crates.io] [![Documentation]][docs.rs]
34

45
A drop-in global allocator wrapper around the [mimalloc](https://github.com/microsoft/mimalloc) allocator.
56
Mimalloc is a general purpose, performance oriented allocator built by Microsoft.
67

78
## Usage
9+
810
```rust
911
use mimalloc::MiMalloc;
1012

1113
#[global_allocator]
1214
static GLOBAL: MiMalloc = MiMalloc;
1315
```
1416

17+
## Requirements
18+
19+
[CMake](https://cmake.org/) and a __C__ compiler are required for building
20+
[mimalloc](https://github.com/microsoft/mimalloc) with cargo.
21+
1522
## Usage without secure mode
16-
By default this library builds mimalloc in secure mode. This means that
17-
heap allocations are encrypted, but this results in a 3% increase in overhead.
23+
24+
By default this library builds mimalloc in secure mode. This add guard pages,
25+
randomized allocation, encrypted free lists, etc. The performance penalty should
26+
only be around 3% according to [mimalloc](https://github.com/microsoft/mimalloc)
27+
own benchmarks.
1828

1929
To disable secure mode, in `Cargo.toml`:
2030
```rust
@@ -25,4 +35,4 @@ mimalloc = { version = "*", default-features = false }
2535
[crates.io]: https://crates.io/crates/mimalloc
2636
[Latest Version]: https://img.shields.io/crates/v/mimalloc.svg
2737
[Documentation]: https://docs.rs/mimalloc/badge.svg
28-
[docs.rs]: https://docs.rs/mimalloc
38+
[docs.rs]: https://docs.rs/mimalloc

0 commit comments

Comments
 (0)