handle the case where 0 or >1 allocs are enabled

In particular this fixes `cargo build --all-features`.
This commit is contained in:
Charles Hall
2024-04-27 16:08:50 -07:00
committed by June
parent e0c0d51a05
commit 3b05417246
5 changed files with 29 additions and 24 deletions

View File

@@ -1,5 +1,3 @@
#![cfg(all(not(target_env = "msvc"), feature = "hardened_malloc", target_os = "linux", not(feature = "jemalloc")))]
#[global_allocator]
static HMALLOC: hardened_malloc_rs::HardenedMalloc = hardened_malloc_rs::HardenedMalloc;