Expand description
Low-level FFI bindings to mimalloc V3 (v3.5.2).
For a safe wrapper, use the rustfs-mimalloc crate.
Structs§
- mi_
heap_ area_ t - mi_
heap_ t - mi_
profiler_ sample_ data_ t - mi_
profiler_ t - Experimental mimalloc profiling hook table.
- mi_
subproc_ id_ t - Subprocess identifier. Opaque handle — do not access fields directly.
- mi_
theap_ t
Enums§
- c_void
- Equivalent to C’s
voidtype when used as a pointer. - mi_
option_ t
Constants§
- MI_
PROFILE_ SAMPLE_ DATA_ MAX_ SIZE - Maximum user data bytes stored inline with a sampled profiling allocation.
- MI_
SMALL_ SIZE_ MAX - Maximum byte size for mimalloc’s small allocation fast path.
- MI_
SMALL_ WSIZE_ MAX - Maximum word count for mimalloc’s small allocation fast path.
Functions§
- mi_
arena_ ⚠max_ object_ size - mi_
arena_ ⚠min_ alignment - mi_
arena_ ⚠min_ size - mi_
calloc ⚠ - mi_
calloc_ ⚠aligned - mi_
collect ⚠ - mi_free⚠
- mi_
free_ ⚠csize - Free an allocation when the size is statically known by the caller.
- mi_
free_ ⚠csize_ nonnull - Free a non-null allocation when the size is statically known by the caller.
- mi_
free_ ⚠size - mi_
free_ ⚠small - mi_
free_ ⚠small_ nonnull - mi_
good_ ⚠size - mi_
heap_ ⚠calloc - mi_
heap_ ⚠collect - mi_
heap_ ⚠contains - mi_
heap_ ⚠delete - mi_
heap_ ⚠destroy - mi_
heap_ ⚠main - mi_
heap_ ⚠malloc - mi_
heap_ ⚠malloc_ aligned - mi_
heap_ ⚠new - mi_
heap_ ⚠new_ in_ arena - mi_
heap_ ⚠of - mi_
heap_ ⚠profile - mi_
heap_ ⚠profile_ disable - mi_
heap_ ⚠realloc - mi_
heap_ ⚠stats_ get_ json - mi_
heap_ ⚠stats_ print_ out - mi_
heap_ ⚠theap - mi_
heap_ ⚠zalloc - mi_
malloc ⚠ - mi_
malloc_ ⚠aligned - mi_
malloc_ ⚠csize - Allocate when the size is statically known by the caller.
- mi_
malloc_ ⚠size - mi_
malloc_ ⚠small - mi_
malloc_ ⚠usable_ size - mi_
mallocn ⚠ - mi_
manage_ ⚠os_ memory_ ex - mi_
memalign ⚠ - mi_
option_ ⚠disable - mi_
option_ ⚠enable - mi_
option_ ⚠get - mi_
option_ ⚠get_ size - mi_
option_ ⚠is_ enabled - mi_
option_ ⚠set - mi_
posix_ ⚠memalign - mi_
process_ ⚠info - mi_
process_ ⚠info_ print_ out - mi_
profile ⚠ - mi_
profiler_ ⚠start - mi_
profiler_ ⚠stop - mi_
realloc ⚠ - mi_
realloc_ ⚠aligned - mi_
reallocn ⚠ - mi_
reserve_ ⚠os_ memory_ ex - mi_
stats_ ⚠get_ json - mi_
stats_ ⚠print_ out - mi_
stats_ ⚠reset - mi_
strdup ⚠ - mi_
subproc_ ⚠profile - mi_
theap_ ⚠malloc - mi_
theap_ ⚠malloc_ csize - Allocate from a thread-local heap when the size is statically known.
- mi_
theap_ ⚠malloc_ small - mi_
theap_ ⚠stats_ merge_ to_ heap - mi_
theap_ ⚠wmalloc_ small - mi_
theap_ ⚠wzalloc_ small - mi_
theap_ ⚠zalloc - mi_
theap_ ⚠zalloc_ csize - Allocate zeroed memory from a thread-local heap when the size is statically known.
- mi_
theap_ ⚠zalloc_ small - mi_
thread_ ⚠set_ in_ threadpool - mi_
usable_ ⚠size - mi_
version ⚠ - mi_
wmalloc_ ⚠small - mi_
wsize_ from_ size - Convert a byte size to a mimalloc machine-word count.
- mi_
wzalloc_ ⚠small - mi_
zalloc ⚠ - mi_
zalloc_ ⚠aligned - mi_
zalloc_ ⚠csize - Allocate zeroed memory when the size is statically known by the caller.
- mi_
zalloc_ ⚠small
Type Aliases§
- c_char
- Equivalent to C’s
chartype. - c_int
- Equivalent to C’s
signed int(int) type. - c_long
- Equivalent to C’s
signed long(long) type. - mi_
arena_ id_ t - Arena identifier. Opaque handle.
- mi_
block_ visit_ fun - mi_
deferred_ free_ fun - mi_
error_ fun - mi_
heap_ visit_ fun - mi_
output_ fun - mi_
profiler_ on_ alloc_ fun - mi_
profiler_ on_ free_ fun - mi_
profiler_ on_ realloc_ inplace_ fun - size_t