mi_usable_size

Return the available bytes in a memory block.

extern (C) @nogc pure @system nothrow
size_t
mi_usable_size
(
const(void)* p
)

Parameters

p
Type: const(void)*

Pointer to previously allocated memory (or NULL)

Return Value

Type: size_t

Returns the available bytes in the memory block, or 0 if p was NULL.

The returned size can be used to call mi_expand successfully. The returned size is always at least equal to the allocated size of p, and, in the current design, should be less than 16.7% more.

Meta