Allocate size
bytes aligned by alignment
with alignment as the first
parameter.
Allocate count
items of size
length each.
Allocate size * count
bytes aligned by alignment
.
Allocate size * count
bytes aligned by alignment
at a specified
offset
, zero-initialized.
Check safely if any pointer is part of the default heap of this thread.
Eagerly free memory.
Try to re-allocate memory to newsize
bytes in place.
Free previously allocated memory.
Alignment-aware deallocation: Like
mi_free
, but
accepts the size and alignment as well.
Size-aware deallocation: Like
mi_free
, but accepts
the size and alignment as well.
Layout-aware deallocation: Like
mi_free
, but accepts
the size and alignment as well.
Return the used allocation size.
Equivalent to
mi_calloc
, but allocates out of the specific heap
instead of the default.
Equivalent to
mi_calloc_aligned
, but allocates out of the specific
heap instead of the default.
Check safely if any pointer is part of a heap.
Release outstanding resources in a specific heap.
Does a heap contain a pointer to a previously allocated block?
Delete a previously allocated heap.
Destroy a heap, freeing all its still allocated blocks.
Get the backing heap.
Get the default heap that is used for
mi_malloc
et al.
Equivalent to
mi_malloc
, but allocates out of the
specific heap instead of the default.
Equivalent to
mi_malloc_aligned
, but
allocates out of the specific heap instead of the default.
Equivalent to
mi_malloc_small
, but allocates out of the specific
heap instead of the default.
Equivalent to
mi_mallocn
, but allocates out of the specific heap
instead of the default.
Create a new heap that can be used for allocation.
Equivalent to
mi_realloc
, but allocates out of
the specific heap instead of the default.
Equivalent to
mi_realloc_aligned
, but allocates out of the specific
heap instead of the default.
Equivalent to
mi_reallocf
, but allocates out of the specific heap
instead of the default.
Equivalent to
mi_reallocn
, but allocates out of the specific heap
instead of the default.
Equivalent to
mi_realpath
, but allocates out of the specific heap
instead of the default.
Equivalent to
mi_recalloc
, but allocates out of the specific heap
instead of the default.
Equivalent to
mi_recalloc_aligned
, but allocates out of the
specific heap instead of the default.
Equivalent to
mi_rezalloc
, but allocates out of the specific heap
instead of the default.
Equivalent to
mi_rezalloc_aligned
, but allocates out of the specific
heap instead of the default.
Set the default heap to use for
mi_malloc
et al.
Equivalent to
mi_strdup
, but allocates out of the specific heap
instead of the default.
Equivalent to
mi_strndup
, but allocates out of the specific heap
instead of the default.
Visit all areas and blocks in heap
.
Equivalent to
mi_zalloc
, but allocates out of the
specific heap instead of the default.
Equivalent to
mi_zalloc_aligned
, but
allocates out of the specific heap instead of the default.
Returns true if this is a pointer into a memory region that has been
reserved by the mimalloc heap.
Allocate size
bytes.
Allocate size
bytes aligned by alignment
.
Allocate size
bytes aligned by alignment
at a specified offset
.
Allocate count
items of size
length each.
Returns the value of the provided option.
Returns true if the provided option is enabled.
Set the option to the given value.
Enable or disable the given option.
Allocate size
of bytes aligned by alignment
and place the address of the
allocated memory to ptr
.
Return process information (time and memory usage). All parameters are
optional (nullable) out-params:
Initialize the process.
Re-allocate memory to newsize
bytes.
Re-allocate memory to newsize
bytes, aligned by alignment
.
Re-allocate memory to newsize
bytes aligned by alignment
at a
specified offset
.
Re-allocate memory to newsize
bytes.
Re-allocate memory to count
elements of size
bytes.
Resolve a file path name, producing a
C
string which can be passed to
mi_free
.
Zero initialized
re-allocation, following
calloc
paramater conventions.
Register a deferred free function.
Register an error callback function.
Register an output function.
Merge thread local statistics with the main statistics and reset.
Print the main statistics.
Print the main statistics.
Reset statistics.
Allocate and duplicate a nul-terminated C string.
Allocate and duplicate a nul-terminated C string, up to n
bytes.
Uninitialize mimalloc on a thread.
Initialize mimalloc on a thread.
Print out heap statistics for this thread.
Return the available bytes in a memory block.
Return the mimalloc version number.
Allocate zero-initialized size
bytes.
Allocate size
bytes aligned by alignment
, initialized to zero.
Allocate size
bytes aligned by alignment
at a specified offset
,
zero-initialized.