add jemallctl base; add trim to interface w/ console cmd

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-01-16 08:58:40 +00:00
parent 80832cb0bb
commit 7a8ca8842a
6 changed files with 144 additions and 6 deletions

View File

@@ -4,7 +4,7 @@
#[cfg(all(not(target_env = "msvc"), feature = "jemalloc"))]
pub mod je;
#[cfg(all(not(target_env = "msvc"), feature = "jemalloc"))]
pub use je::{memory_stats, memory_usage};
pub use je::{memory_stats, memory_usage, trim};
#[cfg(all(not(target_env = "msvc"), feature = "hardened_malloc", not(feature = "jemalloc")))]
pub mod hardened;
@@ -13,7 +13,7 @@ pub mod hardened;
feature = "hardened_malloc",
not(feature = "jemalloc")
))]
pub use hardened::{memory_stats, memory_usage};
pub use hardened::{memory_stats, memory_usage, trim};
#[cfg(any(
target_env = "msvc",
@@ -24,4 +24,4 @@ pub mod default;
target_env = "msvc",
all(not(feature = "hardened_malloc"), not(feature = "jemalloc"))
))]
pub use default::{memory_stats, memory_usage};
pub use default::{memory_stats, memory_usage, trim};