add hardened_malloc-rs feature and global_allocator

Signed-off-by: strawberry <strawberry@pupbrain.dev>
This commit is contained in:
strawberry authored and June committed 2024-04-14 22:35:23 -04:00
1 parent 7d92cad55f
commit ff0d4c98ee
4 files changed
+22 -4

No files matched your search

+7
View File
@@ -46,6 +46,13 @@ mod routes;
#[global_allocator]
static GLOBAL: Jemalloc = Jemalloc;
#[cfg(all(not(target_env = "msvc"), not(target_os = "macos"), feature = "hardened_malloc", target_os = "linux"))]
use hardened_malloc_rs::HardenedMalloc;
#[cfg(all(not(target_env = "msvc"), not(target_os = "macos"), feature = "hardened_malloc", target_os = "linux"))]
#[global_allocator]
static GLOBAL: HardenedMalloc = HardenedMalloc;
struct Server {
config: Config,