mi_ prefixed implementations of various Posix, Unix, and C++ allocation functions. More...
Functions | |
| void * | mi__expand (void *p, size_t newsize) |
| size_t | mi_malloc_size (const void *p) |
| size_t | mi_malloc_good_size (size_t size) |
| size_t | mi_malloc_usable_size (const void *p) |
| int | mi_posix_memalign (void **p, size_t alignment, size_t size) |
| int | mi__posix_memalign (void **p, size_t alignment, size_t size) |
| void * | mi_memalign (size_t alignment, size_t size) |
| void * | mi_valloc (size_t size) |
| void * | mi_pvalloc (size_t size) |
| void * | mi_aligned_alloc (size_t alignment, size_t size) |
| unsigned short * | mi_wcsdup (const unsigned short *s) |
| unsigned char * | mi_mbsdup (const unsigned char *s) |
| int | mi_dupenv_s (char **buf, size_t *size, const char *name) |
| int | mi_wdupenv_s (unsigned short **buf, size_t *size, const unsigned short *name) |
| void * | mi_reallocarray (void *p, size_t count, size_t size) |
| Correspond s to reallocarray in FreeBSD. | |
| int | mi_reallocarr (void *p, size_t count, size_t size) |
| Corresponds to reallocarr in NetBSD. | |
| void * | mi_aligned_recalloc (void *p, size_t newcount, size_t size, size_t alignment) |
| void * | mi_aligned_offset_recalloc (void *p, size_t newcount, size_t size, size_t alignment, size_t offset) |
| void | mi_free_size (void *p, size_t size) |
| Free a block that was allocated with a known size. | |
| void | mi_free_size_nonnull (void *p, size_t size) |
| Free a non-NULL pointer that was allocated with a known size. | |
| void | mi_free_size_aligned (void *p, size_t size, size_t alignment) |
| Free an object that was allocated aligned. | |
| void | mi_free_aligned (void *p, size_t alignment) |
| Free an object that was allocated aligned. | |
mi_ prefixed implementations of various Posix, Unix, and C++ allocation functions.
Defined for convenience as all redirect to the regular mimalloc API.
| void * mi__expand | ( | void * | p, |
| size_t | newsize ) |
| int mi__posix_memalign | ( | void ** | p, |
| size_t | alignment, | ||
| size_t | size ) |
| void * mi_aligned_alloc | ( | size_t | alignment, |
| size_t | size ) |
| void * mi_aligned_offset_recalloc | ( | void * | p, |
| size_t | newcount, | ||
| size_t | size, | ||
| size_t | alignment, | ||
| size_t | offset ) |
| void * mi_aligned_recalloc | ( | void * | p, |
| size_t | newcount, | ||
| size_t | size, | ||
| size_t | alignment ) |
| int mi_dupenv_s | ( | char ** | buf, |
| size_t * | size, | ||
| const char * | name ) |
| void mi_free_aligned | ( | void * | p, |
| size_t | alignment ) |
Free an object that was allocated aligned.
| p | The pointer to the object (or NULL ) |
| alignment | The requested alignment at the allocation. At this time just defers to mi_free() but it can be optimized in the future for aligned allocations. |
| void mi_free_size | ( | void * | p, |
| size_t | size ) |
Free a block that was allocated with a known size.
| p | The pointer that was allocated with size bytes (or NULL ) |
| size | The size in bytes. v3: this can improve performance for objects with a size < MI_SMALL_SIZE_MAX() as it will use mi_free_small() internally. Always use this if possible. Note: it is not allowed to use mi_free_size() for aligned allocations, use mi_free_size_aligned() (mi_free()) instead. |
| void mi_free_size_aligned | ( | void * | p, |
| size_t | size, | ||
| size_t | alignment ) |
Free an object that was allocated aligned.
| p | The pointer to the object (or NULL ) |
| size | The size of the object as allocated. |
| alignment | The requested alignment at the allocation. This can be faster than using mi_free() for aligned allocations. |
| void mi_free_size_nonnull | ( | void * | p, |
| size_t | size ) |
Free a non-NULL pointer that was allocated with a known size.
| p | The pointer that was allocated with size bytes (cannot be NULL !) |
| size | The size in bytes. v3: this can improve performance for objects with a size < MI_SMALL_SIZE_MAX() as it will use mi_free_small_nonnull() internally. Always use this if possible. Note: it is not allowed to use mi_free_size() for aligned allocations, use mi_free_size_aligned() (or mi_free()) instead. |
| size_t mi_malloc_good_size | ( | size_t | size | ) |
| size_t mi_malloc_size | ( | const void * | p | ) |
| size_t mi_malloc_usable_size | ( | const void * | p | ) |
| unsigned char * mi_mbsdup | ( | const unsigned char * | s | ) |
| void * mi_memalign | ( | size_t | alignment, |
| size_t | size ) |
| int mi_posix_memalign | ( | void ** | p, |
| size_t | alignment, | ||
| size_t | size ) |
| void * mi_pvalloc | ( | size_t | size | ) |
| int mi_reallocarr | ( | void * | p, |
| size_t | count, | ||
| size_t | size ) |
Corresponds to reallocarr in NetBSD.
| void * mi_reallocarray | ( | void * | p, |
| size_t | count, | ||
| size_t | size ) |
Correspond s to reallocarray in FreeBSD.
| void * mi_valloc | ( | size_t | size | ) |
| unsigned short * mi_wcsdup | ( | const unsigned short * | s | ) |
| int mi_wdupenv_s | ( | unsigned short ** | buf, |
| size_t * | size, | ||
| const unsigned short * | name ) |