mi-malloc  1.7/2.0
mimalloc-doc.h
1 /* ----------------------------------------------------------------------------
2 Copyright (c) 2018-2021, Microsoft Research, Daan Leijen
3 This is free software; you can redistribute it and/or modify it under the
4 terms of the MIT license. A copy of the license can be found in the file
5 "LICENSE" at the root of this distribution.
6 -----------------------------------------------------------------------------*/
7 
8 #error "documentation file only!"
9 
10 
94 
95 
99 void mi_free(void* p);
100 
105 void* mi_malloc(size_t size);
106 
111 void* mi_zalloc(size_t size);
112 
122 void* mi_calloc(size_t count, size_t size);
123 
136 void* mi_realloc(void* p, size_t newsize);
137 
148 void* mi_recalloc(void* p, size_t count, size_t size);
149 
163 void* mi_expand(void* p, size_t newsize);
164 
174 void* mi_mallocn(size_t count, size_t size);
175 
185 void* mi_reallocn(void* p, size_t count, size_t size);
186 
203 void* mi_reallocf(void* p, size_t newsize);
204 
205 
214 char* mi_strdup(const char* s);
215 
225 char* mi_strndup(const char* s, size_t n);
226 
239 char* mi_realpath(const char* fname, char* resolved_name);
240 
242 
243 // ------------------------------------------------------
244 // Extended functionality
245 // ------------------------------------------------------
246 
250 
253 #define MI_SMALL_SIZE_MAX (128*sizeof(void*))
254 
262 void* mi_malloc_small(size_t size);
263 
271 void* mi_zalloc_small(size_t size);
272 
287 size_t mi_usable_size(void* p);
288 
298 size_t mi_good_size(size_t size);
299 
307 void mi_collect(bool force);
308 
313 void mi_stats_print(void* out);
314 
320 void mi_stats_print_out(mi_output_fun* out, void* arg);
321 
323 void mi_stats_reset(void);
324 
326 void mi_stats_merge(void);
327 
331 void mi_thread_init(void);
332 
337 void mi_thread_done(void);
338 
345 
352 typedef void (mi_deferred_free_fun)(bool force, unsigned long long heartbeat, void* arg);
353 
369 void mi_register_deferred_free(mi_deferred_free_fun* deferred_free, void* arg);
370 
376 typedef void (mi_output_fun)(const char* msg, void* arg);
377 
384 void mi_register_output(mi_output_fun* out, void* arg);
385 
391 typedef void (mi_error_fun)(int err, void* arg);
392 
408 void mi_register_error(mi_error_fun* errfun, void* arg);
409 
414 bool mi_is_in_heap_region(const void* p);
415 
424 int mi_reserve_os_memory(size_t size, bool commit, bool allow_large);
425 
437 bool mi_manage_os_memory(void* start, size_t size, bool is_committed, bool is_large, bool is_zero, int numa_node);
438 
451 int mi_reserve_huge_os_pages_interleave(size_t pages, size_t numa_nodes, size_t timeout_msecs);
452 
465 int mi_reserve_huge_os_pages_at(size_t pages, int numa_node, size_t timeout_msecs);
466 
467 
473 
487 void mi_process_info(size_t* elapsed_msecs, size_t* user_msecs, size_t* system_msecs, size_t* current_rss, size_t* peak_rss, size_t* current_commit, size_t* peak_commit, size_t* page_faults);
488 
490 
491 // ------------------------------------------------------
492 // Aligned allocation
493 // ------------------------------------------------------
494 
500 
502 #define MI_ALIGNMENT_MAX (1024*1024UL)
503 
516 void* mi_malloc_aligned(size_t size, size_t alignment);
517 void* mi_zalloc_aligned(size_t size, size_t alignment);
518 void* mi_calloc_aligned(size_t count, size_t size, size_t alignment);
519 void* mi_realloc_aligned(void* p, size_t newsize, size_t alignment);
520 
531 void* mi_malloc_aligned_at(size_t size, size_t alignment, size_t offset);
532 void* mi_zalloc_aligned_at(size_t size, size_t alignment, size_t offset);
533 void* mi_calloc_aligned_at(size_t count, size_t size, size_t alignment, size_t offset);
534 void* mi_realloc_aligned_at(void* p, size_t newsize, size_t alignment, size_t offset);
535 
537 
543 
548 struct mi_heap_s;
549 
554 typedef struct mi_heap_s mi_heap_t;
555 
558 
567 
576 
581 
585 
592 
594 void mi_heap_collect(mi_heap_t* heap, bool force);
595 
598 void* mi_heap_malloc(mi_heap_t* heap, size_t size);
599 
603 void* mi_heap_malloc_small(mi_heap_t* heap, size_t size);
604 
607 void* mi_heap_zalloc(mi_heap_t* heap, size_t size);
608 
611 void* mi_heap_calloc(mi_heap_t* heap, size_t count, size_t size);
612 
615 void* mi_heap_mallocn(mi_heap_t* heap, size_t count, size_t size);
616 
619 char* mi_heap_strdup(mi_heap_t* heap, const char* s);
620 
623 char* mi_heap_strndup(mi_heap_t* heap, const char* s, size_t n);
624 
627 char* mi_heap_realpath(mi_heap_t* heap, const char* fname, char* resolved_name);
628 
629 void* mi_heap_realloc(mi_heap_t* heap, void* p, size_t newsize);
630 void* mi_heap_reallocn(mi_heap_t* heap, void* p, size_t count, size_t size);
631 void* mi_heap_reallocf(mi_heap_t* heap, void* p, size_t newsize);
632 
633 void* mi_heap_malloc_aligned(mi_heap_t* heap, size_t size, size_t alignment);
634 void* mi_heap_malloc_aligned_at(mi_heap_t* heap, size_t size, size_t alignment, size_t offset);
635 void* mi_heap_zalloc_aligned(mi_heap_t* heap, size_t size, size_t alignment);
636 void* mi_heap_zalloc_aligned_at(mi_heap_t* heap, size_t size, size_t alignment, size_t offset);
637 void* mi_heap_calloc_aligned(mi_heap_t* heap, size_t count, size_t size, size_t alignment);
638 void* mi_heap_calloc_aligned_at(mi_heap_t* heap, size_t count, size_t size, size_t alignment, size_t offset);
639 void* mi_heap_realloc_aligned(mi_heap_t* heap, void* p, size_t newsize, size_t alignment);
640 void* mi_heap_realloc_aligned_at(mi_heap_t* heap, void* p, size_t newsize, size_t alignment, size_t offset);
641 
643 
644 
653 
654 void* mi_rezalloc(void* p, size_t newsize);
655 void* mi_recalloc(void* p, size_t newcount, size_t size) ;
656 
657 void* mi_rezalloc_aligned(void* p, size_t newsize, size_t alignment);
658 void* mi_rezalloc_aligned_at(void* p, size_t newsize, size_t alignment, size_t offset);
659 void* mi_recalloc_aligned(void* p, size_t newcount, size_t size, size_t alignment);
660 void* mi_recalloc_aligned_at(void* p, size_t newcount, size_t size, size_t alignment, size_t offset);
661 
662 void* mi_heap_rezalloc(mi_heap_t* heap, void* p, size_t newsize);
663 void* mi_heap_recalloc(mi_heap_t* heap, void* p, size_t newcount, size_t size);
664 
665 void* mi_heap_rezalloc_aligned(mi_heap_t* heap, void* p, size_t newsize, size_t alignment);
666 void* mi_heap_rezalloc_aligned_at(mi_heap_t* heap, void* p, size_t newsize, size_t alignment, size_t offset);
667 void* mi_heap_recalloc_aligned(mi_heap_t* heap, void* p, size_t newcount, size_t size, size_t alignment);
668 void* mi_heap_recalloc_aligned_at(mi_heap_t* heap, void* p, size_t newcount, size_t size, size_t alignment, size_t offset);
669 
671 
680 
692 #define mi_malloc_tp(tp) ((tp*)mi_malloc(sizeof(tp)))
693 
695 #define mi_zalloc_tp(tp) ((tp*)mi_zalloc(sizeof(tp)))
696 
698 #define mi_calloc_tp(tp,count) ((tp*)mi_calloc(count,sizeof(tp)))
699 
701 #define mi_mallocn_tp(tp,count) ((tp*)mi_mallocn(count,sizeof(tp)))
702 
704 #define mi_reallocn_tp(p,tp,count) ((tp*)mi_reallocn(p,count,sizeof(tp)))
705 
707 #define mi_heap_malloc_tp(hp,tp) ((tp*)mi_heap_malloc(hp,sizeof(tp)))
708 
710 #define mi_heap_zalloc_tp(hp,tp) ((tp*)mi_heap_zalloc(hp,sizeof(tp)))
711 
713 #define mi_heap_calloc_tp(hp,tp,count) ((tp*)mi_heap_calloc(hp,count,sizeof(tp)))
714 
716 #define mi_heap_mallocn_tp(hp,tp,count) ((tp*)mi_heap_mallocn(hp,count,sizeof(tp)))
717 
719 #define mi_heap_reallocn_tp(hp,p,tp,count) ((tp*)mi_heap_reallocn(p,count,sizeof(tp)))
720 
722 #define mi_heap_recalloc_tp(hp,p,tp,count) ((tp*)mi_heap_recalloc(p,count,sizeof(tp)))
723 
725 
731 
738 bool mi_heap_contains_block(mi_heap_t* heap, const void* p);
739 
748 bool mi_heap_check_owned(mi_heap_t* heap, const void* p);
749 
757 bool mi_check_owned(const void* p);
758 
761 typedef struct mi_heap_area_s {
762  void* blocks;
763  size_t reserved;
764  size_t committed;
765  size_t used;
766  size_t block_size;
768 
776 typedef bool (mi_block_visit_fun)(const mi_heap_t* heap, const mi_heap_area_t* area, void* block, size_t block_size, void* arg);
777 
789 bool mi_heap_visit_blocks(const mi_heap_t* heap, bool visit_all_blocks, mi_block_visit_fun* visitor, void* arg);
790 
792 
798 
800 typedef enum mi_option_e {
801  // stable options
805  // the following options are experimental
821 
822 
826 void mi_option_set_enabled(mi_option_t option, bool enable);
827 void mi_option_set_enabled_default(mi_option_t option, bool enable);
828 
830 void mi_option_set(mi_option_t option, long value);
831 void mi_option_set_default(mi_option_t option, long value);
832 
833 
835 
842 
843 void* mi_recalloc(void* p, size_t count, size_t size);
844 size_t mi_malloc_size(const void* p);
845 size_t mi_malloc_usable_size(const void *p);
846 
848 void mi_cfree(void* p);
849 
850 int mi_posix_memalign(void** p, size_t alignment, size_t size);
851 int mi__posix_memalign(void** p, size_t alignment, size_t size);
852 void* mi_memalign(size_t alignment, size_t size);
853 void* mi_valloc(size_t size);
854 
855 void* mi_pvalloc(size_t size);
856 void* mi_aligned_alloc(size_t alignment, size_t size);
857 
860 void* mi_reallocarray(void* p, size_t count, size_t size);
861 
863 int mi_reallocarr(void* p, size_t count, size_t size);
864 
865 void mi_free_size(void* p, size_t size);
866 void mi_free_size_aligned(void* p, size_t size, size_t alignment);
867 void mi_free_aligned(void* p, size_t alignment);
868 
870 
883 
885 void* mi_new(std::size_t n) noexcept(false);
886 
888 void* mi_new_n(size_t count, size_t size) noexcept(false);
889 
891 void* mi_new_aligned(std::size_t n, std::align_val_t alignment) noexcept(false);
892 
894 void* mi_new_nothrow(size_t n);
895 
897 void* mi_new_aligned_nothrow(size_t n, size_t alignment);
898 
900 void* mi_new_realloc(void* p, size_t newsize);
901 
903 void* mi_new_reallocn(void* p, size_t newcount, size_t size);
904 
912 template<class T> struct mi_stl_allocator { }
913 
915 
void * mi_calloc_aligned_at(size_t count, size_t size, size_t alignment, size_t offset)
void * mi_zalloc_aligned(size_t size, size_t alignment)
void * mi_realloc_aligned(void *p, size_t newsize, size_t alignment)
void * mi_calloc_aligned(size_t count, size_t size, size_t alignment)
void * mi_malloc_aligned_at(size_t size, size_t alignment, size_t offset)
Allocate size bytes aligned by alignment at a specified offset.
void * mi_zalloc_aligned_at(size_t size, size_t alignment, size_t offset)
void * mi_malloc_aligned(size_t size, size_t alignment)
Allocate size bytes aligned by alignment.
void * mi_realloc_aligned_at(void *p, size_t newsize, size_t alignment, size_t offset)
size_t block_size
size in bytes of one block
Definition: mimalloc-doc.h:766
size_t committed
current committed bytes of this area
Definition: mimalloc-doc.h:764
size_t used
bytes in use by allocated blocks
Definition: mimalloc-doc.h:765
void * blocks
start of the area containing heap blocks
Definition: mimalloc-doc.h:762
size_t reserved
bytes reserved for this area
Definition: mimalloc-doc.h:763
bool mi_heap_check_owned(mi_heap_t *heap, const void *p)
Check safely if any pointer is part of a heap.
bool mi_check_owned(const void *p)
Check safely if any pointer is part of the default heap of this thread.
bool mi_heap_visit_blocks(const mi_heap_t *heap, bool visit_all_blocks, mi_block_visit_fun *visitor, void *arg)
Visit all areas and blocks in a heap.
bool mi_heap_contains_block(mi_heap_t *heap, const void *p)
Does a heap contain a pointer to a previously allocated block?
bool() mi_block_visit_fun(const mi_heap_t *heap, const mi_heap_area_t *area, void *block, size_t block_size, void *arg)
Visitor function passed to mi_heap_visit_blocks()
Definition: mimalloc-doc.h:776
An area of heap space contains blocks of a single size.
Definition: mimalloc-doc.h:761
void * mi_new_reallocn(void *p, size_t newcount, size_t size)
like mi_reallocn(), but when out of memory, use std::get_new_handler and raise std::bad_alloc excepti...
void * mi_new_realloc(void *p, size_t newsize)
like mi_realloc(), but when out of memory, use std::get_new_handler and raise std::bad_alloc exceptio...
void * mi_new(std::size_t n) noexcept(false)
like mi_malloc(), but when out of memory, use std::get_new_handler and raise std::bad_alloc exception...
void * mi_new_aligned_nothrow(size_t n, size_t alignment)
like mi_malloc_aligned, but when out of memory, use std::get_new_handler but return NULL on failure.
void * mi_new_n(size_t count, size_t size) noexcept(false)
like mi_mallocn(), but when out of memory, use std::get_new_handler and raise std::bad_alloc exceptio...
void * mi_new_nothrow(size_t n)
like mi_malloc, but when out of memory, use std::get_new_handler but return NULL on failure.
void * mi_new_aligned(std::size_t n, std::align_val_t alignment) noexcept(false)
like mi_malloc_aligned(), but when out of memory, use std::get_new_handler and raise std::bad_alloc e...
std::allocator implementation for mimalloc for use in STL containers.
Definition: mimalloc-doc.h:912
int mi_reserve_os_memory(size_t size, bool commit, bool allow_large)
Reserve OS memory for use by mimalloc.
size_t mi_usable_size(void *p)
Return the available bytes in a memory block.
void mi_thread_done(void)
Uninitialize mimalloc on a thread.
void * mi_zalloc_small(size_t size)
Allocate a zero initialized small object.
void() mi_error_fun(int err, void *arg)
Type of error callback functions.
Definition: mimalloc-doc.h:391
void() mi_deferred_free_fun(bool force, unsigned long long heartbeat, void *arg)
Type of deferred free functions.
Definition: mimalloc-doc.h:352
void mi_stats_print(void *out)
Deprecated.
int mi_reserve_huge_os_pages_interleave(size_t pages, size_t numa_nodes, size_t timeout_msecs)
Reserve pages of huge OS pages (1GiB) evenly divided over numa_nodes nodes, but stops after at most t...
void mi_register_deferred_free(mi_deferred_free_fun *deferred_free, void *arg)
Register a deferred free function.
void mi_stats_reset(void)
Reset statistics.
void mi_collect(bool force)
Eagerly free memory.
bool mi_manage_os_memory(void *start, size_t size, bool is_committed, bool is_large, bool is_zero, int numa_node)
Manage a particular memory area for use by mimalloc.
void mi_stats_print_out(mi_output_fun *out, void *arg)
Print the main statistics.
bool mi_is_in_heap_region(const void *p)
Is a pointer part of our heap?
void * mi_malloc_small(size_t size)
Allocate a small object.
int mi_reserve_huge_os_pages_at(size_t pages, int numa_node, size_t timeout_msecs)
Reserve pages of huge OS pages (1GiB) at a specific numa_node, but stops after at most timeout_msecs ...
void mi_process_info(size_t *elapsed_msecs, size_t *user_msecs, size_t *system_msecs, size_t *current_rss, size_t *peak_rss, size_t *current_commit, size_t *peak_commit, size_t *page_faults)
Return process information (time and memory usage).
void mi_stats_merge(void)
Merge thread local statistics with the main statistics and reset.
void mi_register_error(mi_error_fun *errfun, void *arg)
Register an error callback function.
bool mi_is_redirected()
Is the C runtime malloc API redirected?
void mi_thread_stats_print_out(mi_output_fun *out, void *arg)
Print out heap statistics for this thread.
size_t mi_good_size(size_t size)
Return the used allocation size.
void() mi_output_fun(const char *msg, void *arg)
Type of output functions.
Definition: mimalloc-doc.h:376
void mi_register_output(mi_output_fun *out, void *arg)
Register an output function.
void mi_thread_init(void)
Initialize mimalloc on a thread.
char * mi_heap_realpath(mi_heap_t *heap, const char *fname, char *resolved_name)
Resolve a file path name using a specific heap to allocate the result.
void * mi_heap_calloc_aligned_at(mi_heap_t *heap, size_t count, size_t size, size_t alignment, size_t offset)
char * mi_heap_strdup(mi_heap_t *heap, const char *s)
Duplicate a string in a specific heap.
void * mi_heap_malloc_aligned_at(mi_heap_t *heap, size_t size, size_t alignment, size_t offset)
void mi_heap_delete(mi_heap_t *heap)
Delete a previously allocated heap.
struct mi_heap_s mi_heap_t
Type of first-class heaps.
Definition: mimalloc-doc.h:554
void * mi_heap_zalloc_aligned_at(mi_heap_t *heap, size_t size, size_t alignment, size_t offset)
void * mi_heap_reallocf(mi_heap_t *heap, void *p, size_t newsize)
void * mi_heap_calloc_aligned(mi_heap_t *heap, size_t count, size_t size, size_t alignment)
mi_heap_t * mi_heap_get_backing()
Get the backing heap.
mi_heap_t * mi_heap_new()
Create a new heap that can be used for allocation.
void mi_heap_collect(mi_heap_t *heap, bool force)
Release outstanding resources in a specific heap.
void * mi_heap_mallocn(mi_heap_t *heap, size_t count, size_t size)
Allocate count elements in a specific heap.
mi_heap_t * mi_heap_get_default()
Get the default heap that is used for mi_malloc() et al.
char * mi_heap_strndup(mi_heap_t *heap, const char *s, size_t n)
Duplicate a string of at most length n in a specific heap.
void * mi_heap_zalloc(mi_heap_t *heap, size_t size)
Allocate zero-initialized in a specific heap.
void * mi_heap_malloc(mi_heap_t *heap, size_t size)
Allocate in a specific heap.
void mi_heap_destroy(mi_heap_t *heap)
Destroy a heap, freeing all its still allocated blocks.
void * mi_heap_malloc_small(mi_heap_t *heap, size_t size)
Allocate a small object in a specific heap.
void * mi_heap_zalloc_aligned(mi_heap_t *heap, size_t size, size_t alignment)
void * mi_heap_calloc(mi_heap_t *heap, size_t count, size_t size)
Allocate count zero-initialized elements in a specific heap.
void * mi_heap_realloc(mi_heap_t *heap, void *p, size_t newsize)
void * mi_heap_malloc_aligned(mi_heap_t *heap, size_t size, size_t alignment)
mi_heap_t * mi_heap_set_default(mi_heap_t *heap)
Set the default heap to use for mi_malloc() et al.
void * mi_heap_reallocn(mi_heap_t *heap, void *p, size_t count, size_t size)
void * mi_heap_realloc_aligned_at(mi_heap_t *heap, void *p, size_t newsize, size_t alignment, size_t offset)
void * mi_heap_realloc_aligned(mi_heap_t *heap, void *p, size_t newsize, size_t alignment)
char * mi_realpath(const char *fname, char *resolved_name)
Resolve a file path name.
void * mi_mallocn(size_t count, size_t size)
Allocate count elements of size bytes.
void * mi_recalloc(void *p, size_t count, size_t size)
Re-allocate memory to count elements of size bytes, with extra memory initialized to zero.
void * mi_malloc(size_t size)
Allocate size bytes.
void * mi_reallocn(void *p, size_t count, size_t size)
Re-allocate memory to count elements of size bytes.
void * mi_calloc(size_t count, size_t size)
Allocate zero-initialized count elements of size bytes.
char * mi_strndup(const char *s, size_t n)
Allocate and duplicate a string up to n bytes.
void * mi_expand(void *p, size_t newsize)
Try to re-allocate memory to newsize bytes in place.
char * mi_strdup(const char *s)
Allocate and duplicate a string.
void * mi_realloc(void *p, size_t newsize)
Re-allocate memory to newsize bytes.
void mi_free(void *p)
Free previously allocated memory.
void * mi_zalloc(size_t size)
Allocate zero-initialized size bytes.
void * mi_reallocf(void *p, size_t newsize)
Re-allocate memory to newsize bytes,.
void mi_option_enable(mi_option_t option)
bool mi_option_is_enabled(mi_option_t option)
void mi_option_set_enabled_default(mi_option_t option, bool enable)
long mi_option_get(mi_option_t option)
void mi_option_set_default(mi_option_t option, long value)
void mi_option_set_enabled(mi_option_t option, bool enable)
void mi_option_disable(mi_option_t option)
void mi_option_set(mi_option_t option, long value)
mi_option_t
Runtime options.
Definition: mimalloc-doc.h:800
@ mi_option_show_stats
Print statistics to stderr when the program is done.
Definition: mimalloc-doc.h:803
@ mi_option_use_numa_nodes
Pretend there are at most N NUMA nodes.
Definition: mimalloc-doc.h:815
@ mi_option_reset_delay
Delay in milli-seconds before resetting a page (100ms by default)
Definition: mimalloc-doc.h:814
@ mi_option_eager_commit_delay
Experimental.
Definition: mimalloc-doc.h:817
@ mi_option_eager_commit
Eagerly commit segments (4MiB) (enabled by default).
Definition: mimalloc-doc.h:806
@ mi_option_segment_cache
The number of segments per thread to keep cached.
Definition: mimalloc-doc.h:811
@ mi_option_eager_region_commit
Eagerly commit large (256MiB) memory regions (enabled by default, except on Windows)
Definition: mimalloc-doc.h:807
@ mi_option_large_os_pages
Use large OS pages (2MiB in size) if possible.
Definition: mimalloc-doc.h:808
@ mi_option_os_tag
OS tag to assign to mimalloc'd memory.
Definition: mimalloc-doc.h:818
@ _mi_option_last
Definition: mimalloc-doc.h:819
@ mi_option_verbose
Print verbose messages to stderr.
Definition: mimalloc-doc.h:804
@ mi_option_reserve_huge_os_pages_at
Reserve huge OS pages at node N.
Definition: mimalloc-doc.h:810
@ mi_option_reset_decommits
Experimental.
Definition: mimalloc-doc.h:816
@ mi_option_reserve_huge_os_pages
The number of huge OS pages (1GiB in size) to reserve at the start of the program.
Definition: mimalloc-doc.h:809
@ mi_option_page_reset
Reset page memory after mi_option_reset_delay milliseconds when it becomes free.
Definition: mimalloc-doc.h:812
@ mi_option_segment_reset
Experimental.
Definition: mimalloc-doc.h:813
@ mi_option_show_errors
Print error messages to stderr.
Definition: mimalloc-doc.h:802
size_t mi_malloc_usable_size(const void *p)
void mi_free_aligned(void *p, size_t alignment)
void * mi_aligned_alloc(size_t alignment, size_t size)
size_t mi_malloc_size(const void *p)
void * mi_reallocarray(void *p, size_t count, size_t size)
Correspond s to reallocarray in FreeBSD.
void mi_cfree(void *p)
Just as free but also checks if the pointer p belongs to our heap.
void mi_free_size_aligned(void *p, size_t size, size_t alignment)
void * mi_valloc(size_t size)
int mi_reallocarr(void *p, size_t count, size_t size)
Corresponds to reallocarr in NetBSD.
void * mi_memalign(size_t alignment, size_t size)
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_free_size(void *p, size_t size)
void * mi_pvalloc(size_t size)
void * mi_heap_rezalloc_aligned(mi_heap_t *heap, void *p, size_t newsize, size_t alignment)
void * mi_recalloc_aligned(void *p, size_t newcount, size_t size, size_t alignment)
void * mi_heap_recalloc_aligned_at(mi_heap_t *heap, void *p, size_t newcount, size_t size, size_t alignment, size_t offset)
void * mi_recalloc_aligned_at(void *p, size_t newcount, size_t size, size_t alignment, size_t offset)
void * mi_heap_recalloc(mi_heap_t *heap, void *p, size_t newcount, size_t size)
void * mi_rezalloc(void *p, size_t newsize)
void * mi_heap_recalloc_aligned(mi_heap_t *heap, void *p, size_t newcount, size_t size, size_t alignment)
void * mi_heap_rezalloc_aligned_at(mi_heap_t *heap, void *p, size_t newsize, size_t alignment, size_t offset)
void * mi_rezalloc_aligned(void *p, size_t newsize, size_t alignment)
void * mi_heap_rezalloc(mi_heap_t *heap, void *p, size_t newsize)
void * mi_rezalloc_aligned_at(void *p, size_t newsize, size_t alignment, size_t offset)