Skip to main content

alloc_kernel_heap

Function alloc_kernel_heap 

Source
pub unsafe fn alloc_kernel_heap(layout: Layout) -> *mut u8
Expand description

Compatibility facade over the current global kernel heap policy.

Callers that need an explicit heap allocation entry point, rather than relying on Box/Vec/GlobalAlloc, should use this helper. The selected backend remains the current heap policy:

  • small allocations -> slab
  • large allocations -> vmalloc