Skip to main content

memory_budget/
lib.rs

1#![doc = include_str!("../README.md")]
2
3mod budget;
4mod config;
5#[cfg(feature = "heap-profiling")]
6mod heap_profile;
7mod jemalloc;
8mod lease;
9pub mod policy;
10mod reporter;
11mod reservation_error;
12mod resizable;
13mod rss;
14
15pub use budget::{BudgetSnapshot, CacheSnapshot, MemoryBudget, ReporterSnapshot};
16pub use config::BudgetConfig;
17#[cfg(feature = "jemalloc")]
18pub use jemalloc::SystemJemallocStats;
19pub use jemalloc::{JemallocStats, JemallocStatsSource, NoJemallocStats};
20pub use lease::LeaseGuard;
21pub use reporter::{AtomicReporter, GaugeGuard, MemoryGauge, NonCacheReporter};
22pub use reservation_error::ReservationError;
23pub use resizable::{Resizable, ResizableStats};
24pub use rss::{RssSource, SystemRss};
25
26#[cfg(test)]
27mod tests;
28
29#[cfg(test)]
30mod reservation_tests;
31
32#[cfg(test)]
33mod measurement_tests;