arceos_api::mem

Function ax_alloc_coherent

Source
pub unsafe fn ax_alloc_coherent(layout: Layout) -> Option<DMAInfo>
Available on crate feature dma only.
Expand description

Allocates coherent memory that meets Direct Memory Access (DMA) requirements.

Returns None if the allocation fails.

ยงSafety

This function is unsafe because it requires users to manually manage the buffer life cycle.