Skip to main content

init

Function init 

Source
pub fn init() -> Result<usize, &'static str>
Expand description

Boot Application Processors.

AP kernel stack frames are allocated from the buddy allocator during this function and intentionally leaked (never freed). The allocation happens once at boot while only the BSP is online, so there is no lock contention and no risk of heap exhaustion under concurrent pressure.

If CPU hotplug is added in the future, stack allocation must be moved to a sleepable context (e.g. Mutex-protected) to avoid heap allocation under any spinlock that could be held during hot-add.