File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 13
13
//! static GLOBAL: MiMalloc = MiMalloc;
14
14
//! ```
15
15
//!
16
- //! ## Usage without secure mode
17
- //! By default this library builds mimalloc in secure mode. This means that
18
- //! heap allocations are encrypted, but this results in a 3% increase in overhead.
16
+ //! ## Usage with secure mode
17
+ //! Using secure mode adds guard pages,
18
+ //! randomized allocation, encrypted free lists, etc. The performance penalty is usually
19
+ //! around 10% according to [mimalloc's](https://github.com/microsoft/mimalloc)
20
+ //! own benchmarks.
19
21
//!
20
- //! To disable secure mode, in `Cargo.toml`:
22
+ //! To enable secure mode, put in `Cargo.toml`:
21
23
//! ```rust,ignore
22
24
//! [dependencies]
23
- //! mimalloc = { version = "*", default- features = false }
25
+ //! mimalloc = { version = "*", features = ["secure"] }
24
26
//! ```
25
27
26
28
extern crate libmimalloc_sys as ffi;
You can’t perform that action at this time.
0 commit comments