Files
continuwuity/src/core/alloc/mod.rs
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
1.0 KiB
Rust
Raw Normal View History

//! Integration with allocators
2024-04-27 04:50:20 -07:00
// jemalloc
2024-04-27 04:50:20 -07:00
#[cfg(all(not(target_env = "msvc"), feature = "jemalloc", not(feature = "hardened_malloc")))]
2024-05-09 15:59:08 -07:00
pub mod je;
#[cfg(all(not(target_env = "msvc"), feature = "jemalloc", not(feature = "hardened_malloc")))]
2024-05-09 15:59:08 -07:00
pub use je::{memory_stats, memory_usage};
2024-04-27 04:50:20 -07:00
// hardened_malloc
2024-06-16 15:20:57 -04:00
//#[cfg(all(not(target_env = "msvc"), feature = "hardened_malloc", target_os =
//#[cfg(all(not(target_env "linux", not(feature = "jemalloc")))]
//pub mod hardened;
//#[cfg(all(not(target_env = "msvc"), feature = "hardened_malloc", target_os =
//#[cfg(all(not(target_env "linux", not(feature = "jemalloc")))]
//pub use hardened::{memory_stats, memory_usage};
2024-04-27 04:50:20 -07:00
// default, enabled when none or multiple of the above are enabled
#[cfg(any(
not(any(feature = "jemalloc", feature = "hardened_malloc")),
all(feature = "jemalloc", feature = "hardened_malloc"),
))]
2024-05-09 15:59:08 -07:00
pub mod default;
#[cfg(any(
not(any(feature = "jemalloc", feature = "hardened_malloc")),
all(feature = "jemalloc", feature = "hardened_malloc"),
))]
2024-05-09 15:59:08 -07:00
pub use default::{memory_stats, memory_usage};