#[cfg(feature = "std")]
mod error;
#[cfg(feature = "std")]
mod freeing_bump;
#[cfg(feature = "std")]
pub use error::Error;
#[cfg(feature = "std")]
pub use freeing_bump::{AllocationStats, FreeingBumpHeapAllocator};
#[cfg(feature = "std")]
const PAGE_SIZE: u32 = 65536;
#[cfg(feature = "std")]
const MAX_WASM_PAGES: u32 = (4u64 * 1024 * 1024 * 1024 / PAGE_SIZE as u64) as u32;
#[cfg(feature = "std")]
pub trait Memory {
#[cfg(feature = "std")]
fn with_access_mut<R>(&mut self, run: impl FnOnce(&mut [u8]) -> R) -> R;
#[cfg(feature = "std")]
fn with_access<R>(&self, run: impl FnOnce(&[u8]) -> R) -> R;
#[cfg(feature = "std")]
fn grow(&mut self, additional: u32) -> Result<(), ()>;
#[cfg(feature = "std")]
fn pages(&self) -> u32;
#[cfg(feature = "std")]
fn max_pages(&self) -> Option<u32>;
}