pub struct PsramSplit {
pub private: &'static mut [MaybeUninit<u8>],
pub global_free: usize,
}Expand description
A private PSRAM region carved off the global heap, plus the external bytes
registered with the global heap. Returned by psram_split.
Fields§
§private: &'static mut [MaybeUninit<u8>]A private, exclusive, contiguous PSRAM region for a foreign allocator
(e.g. LVGL’s built-in TLSF via lv_mem_add_pool). It is not part of
the global heap, so the global allocator never hands it to Box / Vec
/ DMA. Its base is the PSRAM mapping base, so it is large-aligned (≥ any
reasonable ALIGN_SIZE) — the caller needs no alignment math and no
unsafe.
'static is sound because esp-hal’s Psram has no Drop: the mapping is
a hardware side effect recorded in esp-hal’s range statics and is not
undone when the Psram value drops.
global_free: usizeExternal (PSRAM) heap free immediately after registering the remainder
with the global heap, in bytes. 0 when reserve was None (all
private, nothing registered).