v3: Allocate or free memory while reporting the allocator's block size in bytes. More...
Functions | |
| void * | mi_umalloc (size_t size, size_t *block_size) |
| Allocate size bytes and report the block size through block_size. | |
| void * | mi_ucalloc (size_t count, size_t size, size_t *block_size) |
| Allocate count zero-initialized elements of size bytes and report the block size. | |
| void * | mi_urealloc (void *p, size_t newsize, size_t *block_size_pre, size_t *block_size_post) |
| Reallocate p to newsize bytes and report the old and new block sizes. | |
| void | mi_ufree (void *p, size_t *block_size) |
| Free p and report its block size, or 0 if p is NULL. | |
| void * | mi_umalloc_aligned (size_t size, size_t alignment, size_t *block_size) |
| As mi_malloc_aligned(), additionally reporting the block size on success. | |
| void * | mi_uzalloc_aligned (size_t size, size_t alignment, size_t *block_size) |
| As mi_zalloc_aligned(), additionally reporting the block size on success. | |
| void * | mi_umalloc_small (size_t size, size_t *block_size) |
| As mi_malloc_small(), additionally reporting the block size on success. | |
| void * | mi_uzalloc_small (size_t size, size_t *block_size) |
| As mi_zalloc_small(), additionally reporting the block size on success. | |
v3: Allocate or free memory while reporting the allocator's block size in bytes.
Reported sizes may include padding or alignment overhead and are not a guarantee of writable capacity. Size output pointers may be NULL. Allocation size outputs are only valid on success; they need not be cleared on failure.
| void * mi_ucalloc | ( | size_t | count, |
| size_t | size, | ||
| size_t * | block_size ) |
Allocate count zero-initialized elements of size bytes and report the block size.
| void mi_ufree | ( | void * | p, |
| size_t * | block_size ) |
Free p and report its block size, or 0 if p is NULL.
| void * mi_umalloc | ( | size_t | size, |
| size_t * | block_size ) |
Allocate size bytes and report the block size through block_size.
| void * mi_umalloc_aligned | ( | size_t | size, |
| size_t | alignment, | ||
| size_t * | block_size ) |
As mi_malloc_aligned(), additionally reporting the block size on success.
| void * mi_umalloc_small | ( | size_t | size, |
| size_t * | block_size ) |
As mi_malloc_small(), additionally reporting the block size on success.
size must not exceed MI_SMALL_SIZE_MAX.
| void * mi_urealloc | ( | void * | p, |
| size_t | newsize, | ||
| size_t * | block_size_pre, | ||
| size_t * | block_size_post ) |
Reallocate p to newsize bytes and report the old and new block sizes.
block_size_pre is 0 for NULL input; block_size_post is valid on success.
| void * mi_uzalloc_aligned | ( | size_t | size, |
| size_t | alignment, | ||
| size_t * | block_size ) |
As mi_zalloc_aligned(), additionally reporting the block size on success.
| void * mi_uzalloc_small | ( | size_t | size, |
| size_t * | block_size ) |
As mi_zalloc_small(), additionally reporting the block size on success.
size must not exceed MI_SMALL_SIZE_MAX.