Skip to content

Commit 71d0017

Browse files
author
Andronik Ordian
committed
libmimalloc-sys: remove secure-full feature
1 parent 07376f7 commit 71d0017

File tree

4 files changed

+6
-21
lines changed

4 files changed

+6
-21
lines changed

Cargo.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,14 @@ license = "MIT"
1414
readme = "README.md"
1515

1616
[workspace]
17-
members = ["libmimalloc-sys" ]
17+
members = ["libmimalloc-sys"]
1818

1919
[badges]
2020
travis-ci = { repository = "purpleprotocol/mimalloc_rust" }
2121

2222
[dependencies]
23-
libmimalloc-sys = { path = "libmimalloc-sys", version = "0.1.13" }
23+
libmimalloc-sys = { path = "libmimalloc-sys", version = "0.1.13", default-features = false }
2424

2525
[features]
2626
default = ["secure"]
2727
secure = ["libmimalloc-sys/secure"]
28-
secure-full = ["libmimalloc-sys/secure", "libmimalloc-sys/secure-full"]

README.md

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ static GLOBAL: MiMalloc = MiMalloc;
2222
## Usage without secure mode
2323

2424
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)
25+
randomized allocation, encrypted free lists, etc. The performance penalty is usually
26+
around 10% according to [mimalloc](https://github.com/microsoft/mimalloc)
2727
own benchmarks.
2828

2929
To disable secure mode, put in `Cargo.toml`:
@@ -32,15 +32,6 @@ To disable secure mode, put in `Cargo.toml`:
3232
mimalloc = { version = "*", default-features = false }
3333
```
3434

35-
## Usage with full secure mode
36-
From version 1.2.0, mimalloc exposes another layer of secure features named `full-secure mode` that adds double-free mitigation. However, this might result in a bigger runtime performance hit than using only the plain secure mode.
37-
38-
To run mimalloc in full-secure mode, put in `Cargo.toml`:
39-
```rust
40-
[dependencies]
41-
mimalloc = { version = "*", features = "secure-full" }
42-
```
43-
4435
[crates.io]: https://crates.io/crates/mimalloc
4536
[Latest Version]: https://img.shields.io/crates/v/mimalloc.svg
4637
[Documentation]: https://docs.rs/mimalloc/badge.svg

libmimalloc-sys/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,3 @@ cmake = "0.1"
1616

1717
[features]
1818
secure = []
19-
secure-full = []

libmimalloc-sys/build.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,12 @@ fn main() {
6464
let mut cfg = &mut Config::new("c_src/mimalloc");
6565

6666
cfg = cfg.define("MI_OVERRIDE", "OFF");
67-
cfg = cfg.define("MI_SECURE", "OFF");
68-
cfg = cfg.define("MI_SECURE_FULL", "OFF");
6967
cfg = cfg.define("MI_BUILD_TESTS", "OFF");
7068

7169
if cfg!(feature = "secure") {
7270
cfg = cfg.define("MI_SECURE", "ON");
73-
}
74-
75-
if cfg!(feature = "secure-full") {
76-
cfg = cfg.define("MI_SECURE_FULL", "ON");
71+
} else {
72+
cfg = cfg.define("MI_SECURE", "OFF");
7773
}
7874

7975
// Inject MI_DEBUG=0

0 commit comments

Comments
 (0)