Skip to main content

mi_theap_malloc_csize

Function mi_theap_malloc_csize 

Source
pub unsafe fn mi_theap_malloc_csize(
    theap: *mut mi_theap_t,
    size: size_t,
) -> *mut c_void
Expand description

Allocate from a thread-local heap when the size is statically known.

This mirrors mimalloc’s inline mi_theap_malloc_csize helper.

§Safety

theap must be non-null and valid for the calling thread. The returned pointer must be checked for null and freed with a compatible mimalloc free API.