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 1313//! static GLOBAL: MiMalloc = MiMalloc;
1414//! ```
1515//!
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.
1921//!
20- //! To disable secure mode, in `Cargo.toml`:
22+ //! To enable secure mode, put in `Cargo.toml`:
2123//! ```rust,ignore
2224//! [dependencies]
23- //! mimalloc = { version = "*", default- features = false }
25+ //! mimalloc = { version = "*", features = ["secure"] }
2426//! ```
2527
2628extern crate libmimalloc_sys as ffi;
You can’t perform that action at this time.
0 commit comments