add hardened_malloc-rs feature and global_allocator
Signed-off-by: strawberry <strawberry@pupbrain.dev>
This commit is contained in:
parent
7d92cad55f
commit
ff0d4c98ee
4 changed files with 22 additions and 4 deletions
|
@ -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,
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue