mi_good_size

Return the used allocation size.

extern (C) @nogc pure @system nothrow
size_t
mi_good_size
(
size_t size
)

Parameters

size
Type: size_t

The minimal required size in bytes.

Return Value

Type: size_t

the size n that will be allocated, where n >= size.

Generally, mi_usable_size(mi_malloc(size)) == mi_good_size(size). This can be used to reduce internal wasted space when allocating buffers for example.

Meta