Skip to main content

bootstrap_default_memory_manager_with_policy

Function bootstrap_default_memory_manager_with_policy 

Source
pub fn bootstrap_default_memory_manager_with_policy<P: AllocationPolicy>(
    policy: &P,
) -> Result<ValidatedAllocations, RuntimeBootstrapError<P::Error>>
Expand description

Bootstrap the default runtime and layer caller-supplied policy over generic range checks.

Authority order is explicit:

  1. ic-memory always owns its governance range.
  2. If any user range is registered, all MemoryManager declarations must belong to the range claimed by their declaring crate.
  3. The caller-supplied AllocationPolicy then applies framework-specific namespace and lifecycle rules.

Framework adapters such as Canic should register only the ranges they want this generic runtime to enforce. If a framework wants its own policy to be authoritative for application space, it should omit user range registrations for that space and enforce the rule in its AllocationPolicy.