#[cfg(feature = "std")]
use std::time::Duration;
#[derive(Debug, Clone)]
pub struct MemoryPoolConfig {
pub max_arena_size: usize,
pub reset_threshold: usize,
pub pressure_threshold: f64,
pub auto_gc: bool,
#[cfg(feature = "std")]
pub min_gc_interval: Duration,
pub growth_rate_threshold: f64,
}
impl Default for MemoryPoolConfig {
fn default() -> Self {
Self {
max_arena_size: 64 * 1024 * 1024, reset_threshold: 1000,
pressure_threshold: 0.8, auto_gc: true,
#[cfg(feature = "std")]
min_gc_interval: Duration::from_secs(30),
growth_rate_threshold: 2.0, }
}
}