1pub(crate) mod ledger;
9mod policy;
10pub mod registry;
11pub mod runtime;
12
13pub use crate::{eager_init, eager_static, ic_memory_key, ic_memory_range};
14
15pub const CANIC_CORE_MEMORY_AUTHORITY: &str = "canic-core";
17pub const CANIC_CONTROL_PLANE_MEMORY_AUTHORITY: &str = "canic-control-plane";
19
20#[cfg(target_arch = "wasm32")]
22pub(crate) fn stable_extent_bytes() -> u64 {
23 ic_cdk::api::stable_size().saturating_mul(65_536)
24}
25
26pub(crate) fn bootstrap_default_memory_manager()
27-> Result<(), ic_memory::RuntimeBootstrapError<registry::MemoryRegistryError>> {
28 ic_memory::bootstrap_default_memory_manager_with_policy(&policy::CanicMemoryManagerPolicy::new())
29 .map(|_| ())
30}