pub mod allocator;
pub mod arena;
#[cfg(unix)]
pub mod hugepages;
#[cfg(unix)]
pub mod mmap;
#[cfg(unix)]
pub mod numa;
pub mod pool;
pub mod zero_copy;
pub use allocator::{
Allocator, AllocatorStats, BuddyAllocator, SlabAllocator, ThreadLocalAllocator,
};
pub use arena::{Arena, ArenaPool, ArenaStats};
#[cfg(unix)]
pub use hugepages::{HugePageAllocator, HugePageConfig, HugePageSize, HugePageStats};
#[cfg(unix)]
pub use mmap::{MemoryMap, MemoryMapConfig, MemoryMapMode};
#[cfg(unix)]
pub use numa::{NumaAllocator, NumaConfig, NumaNode, NumaStats};
pub use pool::{Pool, PoolConfig, PoolStats};
pub use zero_copy::{SharedBuffer, ZeroCopyBuffer, ZeroCopyConfig};
pub const SIMD_ALIGNMENT: usize = 64;
pub const GPU_ALIGNMENT: usize = 256;
pub const PAGE_SIZE: usize = 4096;
pub const HUGE_PAGE_SIZE: usize = 2 * 1024 * 1024;
pub const MAX_POOL_SIZE: usize = 1024 * 1024 * 1024;
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_constants() {
assert_eq!(SIMD_ALIGNMENT, 64);
assert_eq!(GPU_ALIGNMENT, 256);
assert_eq!(PAGE_SIZE, 4096);
assert_eq!(HUGE_PAGE_SIZE, 2 * 1024 * 1024);
}
}