start mallctl suite w/ jemalloc stats

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-04-27 04:50:20 -07:00 committed by June
parent 56f652c12d
commit e4b669360f
9 changed files with 101 additions and 14 deletions

10
src/alloc/hardened.rs Normal file
View file

@ -0,0 +1,10 @@
#![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;
pub(crate) fn memory_usage() -> String {
String::default() //TODO: get usage
}
pub(crate) fn memory_stats() -> String { "Extended statistics are not available from hardened_malloc.".to_owned() }