2024-06-22 19:28:26 +00:00
|
|
|
//! hmalloc allocator
|
|
|
|
|
|
2024-05-09 15:59:08 -07:00
|
|
|
#[global_allocator]
|
|
|
|
|
static HMALLOC: hardened_malloc_rs::HardenedMalloc = hardened_malloc_rs::HardenedMalloc;
|
|
|
|
|
|
2025-01-16 08:58:40 +00:00
|
|
|
pub fn trim() -> crate::Result { Ok(()) }
|
|
|
|
|
|
2024-05-09 15:59:08 -07:00
|
|
|
#[must_use]
|
2024-07-09 21:55:56 +00:00
|
|
|
//TODO: get usage
|
|
|
|
|
pub fn memory_usage() -> Option<string> { None }
|
2024-05-09 15:59:08 -07:00
|
|
|
|
|
|
|
|
#[must_use]
|
2024-07-09 21:55:56 +00:00
|
|
|
pub fn memory_stats() -> Option<String> {
|
|
|
|
|
Some("Extended statistics are not available from hardened_malloc.".to_owned())
|
|
|
|
|
}
|