Skip to main content

bcmalloc/
lib.rs

1#![doc = include_str!("../README.md")]
2#![no_std]
3
4#[cfg(any(test, feature = "std"))]
5#[macro_use]
6extern crate std;
7
8#[cfg(feature = "allocator-api")]
9mod allocator;
10mod cache;
11mod chunks;
12mod config;
13#[cfg(all(feature = "std", not(loom)))]
14mod global;
15mod heap;
16#[cfg(feature = "metrics")]
17mod metrics;
18mod region;
19mod size_class;
20mod slab;
21mod sync;
22mod sys;
23#[cfg(any(test, feature = "testing"))]
24pub mod testing;
25#[cfg(all(feature = "std", not(loom)))]
26mod tls;
27
28pub use config::{Commit, Config};
29#[cfg(all(feature = "std", not(loom)))]
30pub use global::Bcmalloc;
31pub use heap::Heap;
32#[cfg(feature = "metrics")]
33pub use metrics::{ClassMetrics, Events, Metrics};
34pub use region::{Error, Mapping, Region, Stats};
35pub use size_class::{MAX_ALIGN, MAX_SMALL};