<divclass="fragment"><divclass="line"><aname="l00001"></a><spanclass="lineno"> 1</span> <spanclass="comment">/* ----------------------------------------------------------------------------</span></div><divclass="line"><aname="l00002"></a><spanclass="lineno"> 2</span> <spanclass="comment">Copyright (c) 2018, Microsoft Research, Daan Leijen</span></div><divclass="line"><aname="l00003"></a><spanclass="lineno"> 3</span> <spanclass="comment">This is free software; you can redistribute it and/or modify it under the</span></div><divclass="line"><aname="l00004"></a><spanclass="lineno"> 4</span> <spanclass="comment">terms of the MIT license. A copy of the license can be found in the file</span></div><divclass="line"><aname="l00005"></a><spanclass="lineno"> 5</span> <spanclass="comment">"LICENSE" at the root of this distribution.</span></div><divclass="line"><aname="l00006"></a><spanclass="lineno"> 6</span> <spanclass="comment">-----------------------------------------------------------------------------*/</span></div><divclass="line"><aname="l00007"></a><spanclass="lineno"> 7</span> </div><divclass="line"><aname="l00008"></a><spanclass="lineno"> 8</span> <spanclass="preprocessor">#error "documentation file only!"</span></div><divclass="line"><aname="l00009"></a><spanclass="lineno"> 9</span> </div><divclass="line"><aname="l00010"></a><spanclass="lineno"> 10</span> </div><divclass="line"><aname="l00083"></a><spanclass="lineno"> 83</span> </div><divclass="line"><aname="l00087"></a><spanclass="lineno"> 87</span> </div><divclass="line"><aname="l00091"></a><spanclass="lineno"> 91</span> <spanclass="keywordtype">void</span><aclass="code"href="group__malloc.html#gaf2c7b89c327d1f60f59e68b9ea644d95">mi_free</a>(<spanclass="keywordtype">void</span>* p);</div><divclass="line"><aname="l00092"></a><spanclass="lineno"> 92</span> </div><divclass="line"><aname="l00097"></a><spanclass="lineno"> 97</span> <spanclass="keywordtype">void</span>* <aclass="code"href="group__malloc.html#ga3406e8b168bc74c8637b11571a6da83a">mi_malloc</a>(<spanclass="keywordtype">size_t</span> size);</div><divclass="line"><aname="l00098"></a><spanclass="lineno"> 98</span> </div><divclass="line"><aname="l00103"></a><spanclass="lineno"> 103</span> <spanclass="keywordtype">void</span>* <aclass="code"href="group__malloc.html#gafdd9d8bb2986e668ba9884f28af38000">mi_zalloc</a>(<spanclass="keywordtype">size_t</span> size);</div><divclass="line"><aname="l00104"></a><spanclass="lineno"> 104</span> </div><divclass="line"><aname="l00114"></a><spanclass="lineno"> 114</span> <spanclass="keywordtype">void</span>* <aclass="code"href="group__malloc.html#ga97fedb4f7107c592fd7f0f0a8949a57d">mi_calloc</a>(<spanclass="keywordtype">size_t</span> count, <spanclass="keywordtype">size_t</span> size);</div><divclass="line"><aname="l00115"></a><spanclass="lineno"> 115</span> </div><divclass="line"><aname="l00128"></a><spanclass="lineno"> 128</span> <spanclass="keywordtype">void</span>* <aclass="code"href="group__malloc.html#gaf11eb497da57bdfb2de65eb191c69db6">mi_realloc</a>(<spanclass="keywordtype">void</span>* p, <spanclass="keywordtype">size_t</span> newsize);</div><divclass="line"><aname="l00129"></a><spanclass="lineno"> 129</span> </div><divclass="line"><aname="l00140"></a><spanclass="lineno"> 140</span> <spanclass="keywordtype">void</span>* <aclass="code"href="group__malloc.html#ga23a0fbb452b5dce8e31fab1a1958cacc">mi_recalloc</a>(<spanclass="keywordtype">void</span>* p, <spanclass="keywordtype">size_t</span> count, <spanclass="keywordtype">size_t</span> size);</div><divclass="line"><aname="l00141"></a><spanclass="lineno"> 141</span> </div><divclass="line"><aname="l00155"></a><spanclass="lineno"> 155</span> <spanclass="keywordtype">void</span>* <aclass="code"href="group__malloc.html#gaaee66
<divclass="ttc"id="group__extended_html_ga089c859d9eddc5f9b4bd946cd53cebee"><divclass="ttname"><ahref="group__extended.html#ga089c859d9eddc5f9b4bd946cd53cebee">mi_usable_size</a></div><divclass="ttdeci">size_t mi_usable_size(void *p)</div><divclass="ttdoc">Return the available bytes in a memory block.</div></div>
<divclass="ttc"id="group__cpp_html_gaeaded64eda71ed6b1d569d3e723abc4a"><divclass="ttname"><ahref="group__cpp.html#gaeaded64eda71ed6b1d569d3e723abc4a">mi_new_nothrow</a></div><divclass="ttdeci">void * mi_new_nothrow(size_t n)</div><divclass="ttdoc">like mi_malloc, but when out of memory, use std::get_new_handler but return NULL on failure.</div></div>
<divclass="ttc"id="group__malloc_html_ga61d57b4144ba24fba5c1e9b956d13853"><divclass="ttname"><ahref="group__malloc.html#ga61d57b4144ba24fba5c1e9b956d13853">mi_reallocn</a></div><divclass="ttdeci">void * mi_reallocn(void *p, size_t count, size_t size)</div><divclass="ttdoc">Re-allocate memory to count elements of size bytes.</div></div>
<divclass="ttc"id="group__cpp_html_gaab78a32f55149e9fbf432d5288e38e1e"><divclass="ttname"><ahref="group__cpp.html#gaab78a32f55149e9fbf432d5288e38e1e">mi_new_realloc</a></div><divclass="ttdeci">void * mi_new_realloc(void *p, size_t newsize)</div><divclass="ttdoc">like mi_realloc(), but when out of memory, use std::get_new_handler and raise std::bad_alloc exceptio...</div></div>
<divclass="ttc"id="group__malloc_html_ga23a0fbb452b5dce8e31fab1a1958cacc"><divclass="ttname"><ahref="group__malloc.html#ga23a0fbb452b5dce8e31fab1a1958cacc">mi_recalloc</a></div><divclass="ttdeci">void * mi_recalloc(void *p, size_t count, size_t size)</div><divclass="ttdoc">Re-allocate memory to count elements of size bytes, with extra memory initialized to zero.</div></div>
<divclass="ttc"id="group__malloc_html_ga0b05e2bf0f73e7401ae08597ff782ac6"><divclass="ttname"><ahref="group__malloc.html#ga0b05e2bf0f73e7401ae08597ff782ac6">mi_mallocn</a></div><divclass="ttdeci">void * mi_mallocn(size_t count, size_t size)</div><divclass="ttdoc">Allocate count elements of size bytes.</div></div>
<divclass="ttc"id="group__extended_html_ga854b1de8cb067c7316286c28b2fcd3d1"><divclass="ttname"><ahref="group__extended.html#ga854b1de8cb067c7316286c28b2fcd3d1">mi_stats_merge</a></div><divclass="ttdeci">void mi_stats_merge(void)</div><divclass="ttdoc">Merge thread local statistics with the main statistics and reset.</div></div>
<divclass="ttc"id="group__cpp_html_gae7bc4f56cd57ed3359060ff4f38bda81"><divclass="ttname"><ahref="group__cpp.html#gae7bc4f56cd57ed3359060ff4f38bda81">mi_new_n</a></div><divclass="ttdeci">void * mi_new_n(size_t count, size_t size) noexcept(false)</div><divclass="ttdoc">like mi_mallocn(), but when out of memory, use std::get_new_handler and raise std::bad_alloc exceptio...</div></div>
<divclass="ttc"id="group__options_html_ga7ef623e440e6e5545cb08c94e71e4b90"><divclass="ttname"><ahref="group__options.html#ga7ef623e440e6e5545cb08c94e71e4b90">mi_option_set_default</a></div><divclass="ttdeci">void mi_option_set_default(mi_option_t option, long value)</div></div>
<divclass="ttc"id="group__heap_html_ga903104592c8ed53417a3762da6241133"><divclass="ttname"><ahref="group__heap.html#ga903104592c8ed53417a3762da6241133">mi_heap_zalloc</a></div><divclass="ttdeci">void * mi_heap_zalloc(mi_heap_t *heap, size_t size)</div><divclass="ttdoc">Allocate zero-initialized in a specific heap.</div></div>
<divclass="ttc"id="group__options_html_gaf84921c32375e25754dc2ee6a911fa60"><divclass="ttname"><ahref="group__options.html#gaf84921c32375e25754dc2ee6a911fa60">mi_option_set</a></div><divclass="ttdeci">void mi_option_set(mi_option_t option, long value)</div></div>
<divclass="ttc"id="group__options_html_ggafebf7ed116adb38ae5218bc3ce06884ca32ce97ece29f69e82579679cf8a307ad"><divclass="ttname"><ahref="group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca32ce97ece29f69e82579679cf8a307ad">mi_option_eager_region_commit</a></div><divclass="ttdoc">Eagerly commit large (256MiB) memory regions (enabled by default, except on Windows)</div><divclass="ttdef"><b>Definition:</b> mimalloc-doc.h:760</div></div>
<divclass="ttc"id="group__posix_html_ga705dc7a64bffacfeeb0141501a5c35d7"><divclass="ttname"><ahref="group__posix.html#ga705dc7a64bffacfeeb0141501a5c35d7">mi_cfree</a></div><divclass="ttdeci">void mi_cfree(void *p)</div><divclass="ttdoc">Just as free but also checks if the pointer p belongs to our heap.</div></div>
<divclass="ttc"id="group__analysis_html_ae0085e6e1cf059a4eb7767e30e9991b8"><divclass="ttname"><ahref="group__analysis.html#ae0085e6e1cf059a4eb7767e30e9991b8">mi_heap_area_t::blocks</a></div><divclass="ttdeci">void * blocks</div><divclass="ttdoc">start of the area containing heap blocks</div><divclass="ttdef"><b>Definition:</b> mimalloc-doc.h:715</div></div>
<divclass="ttc"id="group__heap_html_ga139d6b09dbf50c3c2523d0f4d1cfdeb5"><divclass="ttname"><ahref="group__heap.html#ga139d6b09dbf50c3c2523d0f4d1cfdeb5">mi_heap_strdup</a></div><divclass="ttdeci">char * mi_heap_strdup(mi_heap_t *heap, const char *s)</div><divclass="ttdoc">Duplicate a string in a specific heap.</div></div>
<divclass="ttc"id="group__heap_html_ga00e95ba1e01acac3cfd95bb7a357a6f0"><divclass="ttname"><ahref="group__heap.html#ga00e95ba1e01acac3cfd95bb7a357a6f0">mi_heap_realpath</a></div><divclass="ttdeci">char * mi_heap_realpath(mi_heap_t *heap, const char *fname, char *resolved_name)</div><divclass="ttdoc">Resolve a file path name using a specific heap to allocate the result.</div></div>
<divclass="ttc"id="group__extended_html_ga220f29f40a44404b0061c15bc1c31152"><divclass="ttname"><ahref="group__extended.html#ga220f29f40a44404b0061c15bc1c31152">mi_zalloc_small</a></div><divclass="ttdeci">void * mi_zalloc_small(size_t size)</div><divclass="ttdoc">Allocate a zero initialized small object.</div></div>
<divclass="ttc"id="group__malloc_html_gaaabf971c2571891433477e2d21a35266"><divclass="ttname"><ahref="group__malloc.html#gaaabf971c2571891433477e2d21a35266">mi_strndup</a></div><divclass="ttdeci">char * mi_strndup(const char *s, size_t n)</div><divclass="ttdoc">Allocate and duplicate a string up to n bytes.</div></div>
<divclass="ttc"id="group__malloc_html_gaaee66a1d483c3e28f585525fb96707e4"><divclass="ttname"><ahref="group__malloc.html#gaaee66a1d483c3e28f585525fb96707e4">mi_expand</a></div><divclass="ttdeci">void * mi_expand(void *p, size_t newsize)</div><divclass="ttdoc">Try to re-allocate memory to newsize bytes in place.</div></div>
<divclass="ttc"id="group__options_html_ggafebf7ed116adb38ae5218bc3ce06884ca2ecbe7ef32f5c84de3739aa4f0b805a1"><divclass="ttname"><ahref="group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca2ecbe7ef32f5c84de3739aa4f0b805a1">mi_option_segment_cache</a></div><divclass="ttdoc">The number of segments per thread to keep cached.</div><divclass="ttdef"><b>Definition:</b> mimalloc-doc.h:763</div></div>
<divclass="ttc"id="group__heap_html_gaa6702b3c48e9e53e50e81b36f5011d55"><divclass="ttname"><ahref="group__heap.html#gaa6702b3c48e9e53e50e81b36f5011d55">mi_heap_calloc</a></div><divclass="ttdeci">void * mi_heap_calloc(mi_heap_t *heap, size_t count, size_t size)</div><divclass="ttdoc">Allocate count zero-initialized elements in a specific heap.</div></div>
<divclass="ttc"id="group__extended_html_gaad25050b19f30cd79397b227e0157a3f"><divclass="ttname"><ahref="group__extended.html#gaad25050b19f30cd79397b227e0157a3f">mi_is_redirected</a></div><divclass="ttdeci">bool mi_is_redirected()</div><divclass="ttdoc">Is the C runtime malloc API redirected?</div></div>
<divclass="ttc"id="group__analysis_html_a332a6c14d736a99699d5453a1cb04b41"><divclass="ttname"><ahref="group__analysis.html#a332a6c14d736a99699d5453a1cb04b41">mi_heap_area_t::block_size</a></div><divclass="ttdeci">size_t block_size</div><divclass="ttdoc">size in bytes of one block</div><divclass="ttdef"><b>Definition:</b> mimalloc-doc.h:719</div></div>
<divclass="ttc"id="group__extended_html_ga3132f521fb756fc0e8ec0b74fb58df50"><divclass="ttname"><ahref="group__extended.html#ga3132f521fb756fc0e8ec0b74fb58df50">mi_reserve_huge_os_pages_interleave</a></div><divclass="ttdeci">int mi_reserve_huge_os_pages_interleave(size_t pages, size_t numa_nodes, size_t timeout_msecs)</div><divclass="ttdoc">Reserve pages of huge OS pages (1GiB) evenly divided over numa_nodes nodes, but stops after at most t...</div></div>
<divclass="ttc"id="group__extended_html_ga299dae78d25ce112e384a98b7309c5be"><divclass="ttname"><ahref="group__extended.html#ga299dae78d25ce112e384a98b7309c5be">mi_deferred_free_fun</a></div><divclass="ttdeci">void() mi_deferred_free_fun(bool force, unsigned long long heartbeat, void *arg)</div><divclass="ttdoc">Type of deferred free functions.</div><divclass="ttdef"><b>Definition:</b> mimalloc-doc.h:344</div></div>
<divclass="ttc"id="group__extended_html_ga5f071b10d4df1c3658e04e7fd67a94e6"><divclass="ttname"><ahref="group__extended.html#ga5f071b10d4df1c3658e04e7fd67a94e6">mi_is_in_heap_region</a></div><divclass="ttdeci">bool mi_is_in_heap_region(const void *p)</div><divclass="ttdoc">Is a pointer part of our heap?</div></div>
<divclass="ttc"id="group__cpp_html_gaef2c2bdb4f70857902d3c8903ac095f3"><divclass="ttname"><ahref="group__cpp.html#gaef2c2bdb4f70857902d3c8903ac095f3">mi_new_aligned</a></div><divclass="ttdeci">void * mi_new_aligned(std::size_t n, std::align_val_t alignment) noexcept(false)</div><divclass="ttdoc">like mi_malloc_aligned(), but when out of memory, use std::get_new_handler and raise std::bad_alloc e...</div></div>
<divclass="ttc"id="group__options_html_ggafebf7ed116adb38ae5218bc3ce06884caca7ed041be3b0b9d0b82432c7bf41af2"><divclass="ttname"><ahref="group__options.html#ggafebf7ed116adb38ae5218bc3ce06884caca7ed041be3b0b9d0b82432c7bf41af2">mi_option_reserve_huge_os_pages</a></div><divclass="ttdoc">The number of huge OS pages (1GiB in size) to reserve at the start of the program.</div><divclass="ttdef"><b>Definition:</b> mimalloc-doc.h:762</div></div>
<divclass="ttc"id="group__options_html_ggafebf7ed116adb38ae5218bc3ce06884cada854dd272c66342f18a93ee254a2968"><divclass="ttname"><ahref="group__options.html#ggafebf7ed116adb38ae5218bc3ce06884cada854dd272c66342f18a93ee254a2968">mi_option_page_reset</a></div><divclass="ttdoc">Reset page memory after mi_option_reset_delay milliseconds when it becomes free.</div><divclass="ttdef"><b>Definition:</b> mimalloc-doc.h:764</div></div>
<divclass="ttc"id="group__extended_html_ga0ae4581e85453456a0d658b2b98bf7bf"><divclass="ttname"><ahref="group__extended.html#ga0ae4581e85453456a0d658b2b98bf7bf">mi_thread_done</a></div><divclass="ttdeci">void mi_thread_done(void)</div><divclass="ttdoc">Uninitialize mimalloc on a thread.</div></div>
<divclass="ttc"id="group__analysis_html_ga70c46687dc6e9dc98b232b02646f8bed"><divclass="ttname"><ahref="group__analysis.html#ga70c46687dc6e9dc98b232b02646f8bed">mi_heap_visit_blocks</a></div><divclass="ttdeci">bool mi_heap_visit_blocks(const mi_heap_t *heap, bool visit_all_blocks, mi_block_visit_fun *visitor, void *arg)</div><divclass="ttdoc">Visit all areas and blocks in a heap.</div></div>
<divclass="ttc"id="group__options_html_ggafebf7ed116adb38ae5218bc3ce06884ca0ac33a18f6b659fcfaf44efb0bab1b74"><divclass="ttname"><ahref="group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca0ac33a18f6b659fcfaf44efb0bab1b74">mi_option_use_numa_nodes</a></div><divclass="ttdoc">Pretend there are at most N NUMA nodes.</div><divclass="ttdef"><b>Definition:</b> mimalloc-doc.h:767</div></div>
<divclass="ttc"id="group__heap_html_ga8e3dbd46650dd26573cf307a2c8f1f5a"><divclass="ttname"><ahref="group__heap.html#ga8e3dbd46650dd26573cf307a2c8f1f5a">mi_heap_strndup</a></div><divclass="ttdeci">char * mi_heap_strndup(mi_heap_t *heap, const char *s, size_t n)</div><divclass="ttdoc">Duplicate a string of at most length n in a specific heap.</div></div>
<divclass="ttc"id="group__cpp_html_gab5e29558926d934c3f1cae8c815f942c"><divclass="ttname"><ahref="group__cpp.html#gab5e29558926d934c3f1cae8c815f942c">mi_new_aligned_nothrow</a></div><divclass="ttdeci">void * mi_new_aligned_nothrow(size_t n, size_t alignment)</div><divclass="ttdoc">like mi_malloc_aligned, but when out of memory, use std::get_new_handler but return NULL on failure.</div></div>
<divclass="ttc"id="group__analysis_html_gaa862aa8ed8d57d84cae41fc1022d71af"><divclass="ttname"><ahref="group__analysis.html#gaa862aa8ed8d57d84cae41fc1022d71af">mi_heap_contains_block</a></div><divclass="ttdeci">bool mi_heap_contains_block(mi_heap_t *heap, const void *p)</div><divclass="ttdoc">Does a heap contain a pointer to a previously allocated block?</div></div>
<divclass="ttc"id="group__heap_html_ga7922f7495cde30b1984d0e6072419298"><divclass="ttname"><ahref="group__heap.html#ga7922f7495cde30b1984d0e6072419298">mi_heap_collect</a></div><divclass="ttdeci">void mi_heap_collect(mi_heap_t *heap, bool force)</div><divclass="ttdoc">Release outstanding resources in a specific heap.</div></div>
<divclass="ttc"id="group__options_html_ggafebf7ed116adb38ae5218bc3ce06884ca4b74ae2a69e445de6c2361b73c1d14bf"><divclass="ttname"><ahref="group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca4b74ae2a69e445de6c2361b73c1d14bf">mi_option_os_tag</a></div><divclass="ttdoc">OS tag to assign to mimalloc'd memory.</div><divclass="ttdef"><b>Definition:</b> mimalloc-doc.h:770</div></div>
<divclass="ttc"id="group__heap_html_ga8db4cbb87314a989a9a187464d6b5e05"><divclass="ttname"><ahref="group__heap.html#ga8db4cbb87314a989a9a187464d6b5e05">mi_heap_get_default</a></div><divclass="ttdeci">mi_heap_t * mi_heap_get_default()</div><divclass="ttdoc">Get the default heap that is used for mi_malloc() et al.</div></div>
<divclass="ttc"id="group__extended_html_ga7795a13d20087447281858d2c771cca1"><divclass="ttname"><ahref="group__extended.html#ga7795a13d20087447281858d2c771cca1">mi_reserve_huge_os_pages_at</a></div><divclass="ttdeci">int mi_reserve_huge_os_pages_at(size_t pages, int numa_node, size_t timeout_msecs)</div><divclass="ttdoc">Reserve pages of huge OS pages (1GiB) at a specific numa_node, but stops after at most timeout_msecs ...</div></div>
<divclass="ttc"id="group__extended_html_gaf8e73efc2cbca9ebfdfb166983a04c17"><divclass="ttname"><ahref="group__extended.html#gaf8e73efc2cbca9ebfdfb166983a04c17">mi_thread_init</a></div><divclass="ttdeci">void mi_thread_init(void)</div><divclass="ttdoc">Initialize mimalloc on a thread.</div></div>
<divclass="ttc"id="group__extended_html_gac057927cd06c854b45fe7847e921bd47"><divclass="ttname"><ahref="group__extended.html#gac057927cd06c854b45fe7847e921bd47">mi_good_size</a></div><divclass="ttdeci">size_t mi_good_size(size_t size)</div><divclass="ttdoc">Return the used allocation size.</div></div>
<divclass="ttc"id="group__extended_html_ga2d126e5c62d3badc35445e5d84166df2"><divclass="ttname"><ahref="group__extended.html#ga2d126e5c62d3badc35445e5d84166df2">mi_stats_print</a></div><divclass="ttdeci">void mi_stats_print(void *out)</div><divclass="ttdoc">Print the main statistics.</div></div>
<divclass="ttc"id="group__heap_html_ga851da6c43fe0b71c1376cee8aef90db0"><divclass="ttname"><ahref="group__heap.html#ga851da6c43fe0b71c1376cee8aef90db0">mi_heap_mallocn</a></div><divclass="ttdeci">void * mi_heap_mallocn(mi_heap_t *heap, size_t count, size_t size)</div><divclass="ttdoc">Allocate count elements in a specific heap.</div></div>
<divclass="ttc"id="group__analysis_html_structmi__heap__area__t"><divclass="ttname"><ahref="group__analysis.html#structmi__heap__area__t">mi_heap_area_t</a></div><divclass="ttdoc">An area of heap space contains blocks of a single size.</div><divclass="ttdef"><b>Definition:</b> mimalloc-doc.h:714</div></div>
<divclass="ttc"id="group__extended_html_gab1dac8476c46cb9eecab767eb40c1525"><divclass="ttname"><ahref="group__extended.html#gab1dac8476c46cb9eecab767eb40c1525">mi_thread_stats_print_out</a></div><divclass="ttdeci">void mi_thread_stats_print_out(mi_output_fun *out, void *arg)</div><divclass="ttdoc">Print out heap statistics for this thread.</div></div>
<divclass="ttc"id="group__options_html_ggafebf7ed116adb38ae5218bc3ce06884ca0957ef73b2550764b4840edf48422fda"><divclass="ttname"><ahref="group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca0957ef73b2550764b4840edf48422fda">mi_option_show_stats</a></div><divclass="ttdoc">Print statistics to stderr when the program is done.</div><divclass="ttdef"><b>Definition:</b> mimalloc-doc.h:755</div></div>
<divclass="ttc"id="group__analysis_html_ae848a3e6840414891035423948ca0383"><divclass="ttname"><ahref="group__analysis.html#ae848a3e6840414891035423948ca0383">mi_heap_area_t::reserved</a></div><divclass="ttdeci">size_t reserved</div><divclass="ttdoc">bytes reserved for this area</div><divclass="ttdef"><b>Definition:</b> mimalloc-doc.h:716</div></div>
<divclass="ttc"id="group__heap_html_ga34a47cde5a5b38c29f1aa3c5e76943c2"><divclass="ttname"><ahref="group__heap.html#ga34a47cde5a5b38c29f1aa3c5e76943c2">mi_heap_t</a></div><divclass="ttdeci">struct mi_heap_s mi_heap_t</div><divclass="ttdoc">Type of first-class heaps.</div><divclass="ttdef"><b>Definition:</b> mimalloc-doc.h:507</div></div>
<divclass="ttc"id="group__analysis_html_ab820302c5cd0df133eb8e51650a008b4"><divclass="ttname"><ahref="group__analysis.html#ab820302c5cd0df133eb8e51650a008b4">mi_heap_area_t::used</a></div><divclass="ttdeci">size_t used</div><divclass="ttdoc">bytes in use by allocated blocks</div><divclass="ttdef"><b>Definition:</b> mimalloc-doc.h:718</div></div>
<divclass="ttc"id="group__cpp_html_ga756f4b2bc6a7ecd0a90baea8e90c7907"><divclass="ttname"><ahref="group__cpp.html#ga756f4b2bc6a7ecd0a90baea8e90c7907">mi_new_reallocn</a></div><divclass="ttdeci">void * mi_new_reallocn(void *p, size_t newcount, size_t size)</div><divclass="ttdoc">like mi_reallocn(), but when out of memory, use std::get_new_handler and raise std::bad_alloc excepti...</div></div>
<divclass="ttc"id="group__heap_html_ga9f9c0844edb9717f4feacd79116b8e0d"><divclass="ttname"><ahref="group__heap.html#ga9f9c0844edb9717f4feacd79116b8e0d">mi_heap_destroy</a></div><divclass="ttdeci">void mi_heap_destroy(mi_heap_t *heap)</div><divclass="ttdoc">Destroy a heap, freeing all its still allocated blocks.</div></div>
<divclass="ttc"id="group__options_html_ggafebf7ed116adb38ae5218bc3ce06884ca4192d491200d0055df0554d4cf65054e"><divclass="ttname"><ahref="group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca4192d491200d0055df0554d4cf65054e">mi_option_large_os_pages</a></div><divclass="ttdoc">Use large OS pages (2MiB in size) if possible.</div><divclass="ttdef"><b>Definition:</b> mimalloc-doc.h:761</div></div>
<divclass="ttc"id="group__cpp_html_structmi__stl__allocator"><divclass="ttname"><ahref="group__cpp.html#structmi__stl__allocator">mi_stl_allocator</a></div><divclass="ttdoc">std::allocator implementation for mimalloc for use in STL containers.</div><divclass="ttdef"><b>Definition:</b> mimalloc-doc.h:856</div></div>
<divclass="ttc"id="group__heap_html_gaa1a1c7a1f4da6826b5a25b70ef878368"><divclass="ttname"><ahref="group__heap.html#gaa1a1c7a1f4da6826b5a25b70ef878368">mi_heap_malloc_small</a></div><divclass="ttdeci">void * mi_heap_malloc_small(mi_heap_t *heap, size_t size)</div><divclass="ttdoc">Allocate a small object in a specific heap.</div></div>
<divclass="ttc"id="group__malloc_html_gac7cffe13f1f458ed16789488bf92b9b2"><divclass="ttname"><ahref="group__malloc.html#gac7cffe13f1f458ed16789488bf92b9b2">mi_strdup</a></div><divclass="ttdeci">char * mi_strdup(const char *s)</div><divclass="ttdoc">Allocate and duplicate a string.</div></div>
<divclass="ttc"id="group__extended_html_ga7136c2e55cb22c98ecf95d08d6debb99"><divclass="ttname"><ahref="group__extended.html#ga7136c2e55cb22c98ecf95d08d6debb99">mi_malloc_small</a></div><divclass="ttdeci">void * mi_malloc_small(size_t size)</div><divclass="ttdoc">Allocate a small object.</div></div>
<divclass="ttc"id="group__analysis_html_ga628c237489c2679af84a4d0d143b3dd5"><divclass="ttname"><ahref="group__analysis.html#ga628c237489c2679af84a4d0d143b3dd5">mi_check_owned</a></div><divclass="ttdeci">bool mi_check_owned(const void *p)</div><divclass="ttdoc">Check safely if any pointer is part of the default heap of this thread.</div></div>
<divclass="ttc"id="group__cpp_html_gaad048a9fce3d02c5909cd05c6ec24545"><divclass="ttname"><ahref="group__cpp.html#gaad048a9fce3d02c5909cd05c6ec24545">mi_new</a></div><divclass="ttdeci">void * mi_new(std::size_t n) noexcept(false)</div><divclass="ttdoc">like mi_malloc(), but when out of memory, use std::get_new_handler and raise std::bad_alloc exception...</div></div>
<divclass="ttc"id="group__options_html_ggafebf7ed116adb38ae5218bc3ce06884ca154fe170131d5212cff57e22b99523c5"><divclass="ttname"><ahref="group__options.html#ggafebf7ed116adb38ae5218bc3ce06884ca154fe170131d5212cff57e22b99523c5">mi_option_reset_delay</a></div><divclass="ttdoc">Delay in milli-seconds before resetting a page (100ms by default)</div><divclass="ttdef"><b>Definition:</b> mimalloc-doc.h:766</div></div>
<divclass="ttc"id="group__heap_html_ga766f672ba56f2fbfeb9d9dbb0b7f6b11"><divclass="ttname"><ahref="group__heap.html#ga766f672ba56f2fbfeb9d9dbb0b7f6b11">mi_heap_new</a></div><divclass="ttdeci">mi_heap_t * mi_heap_new()</div><divclass="ttdoc">Create a new heap that can be used for allocation.</div></div>
<divclass="ttc"id="group__heap_html_ga9cbed01e42c0647907295de92c3fa296"><divclass="ttname"><ahref="group__heap.html#ga9cbed01e42c0647907295de92c3fa296">mi_heap_malloc</a></div><divclass="ttdeci">void * mi_heap_malloc(mi_heap_t *heap, size_t size)</div><divclass="ttdoc">Allocate in a specific heap.</div></div>
<divclass="ttc"id="group__analysis_html_ab47526df656d8837ec3e97f11b83f835"><divclass="ttname"><ahref="group__analysis.html#ab47526df656d8837ec3e97f11b83f835">mi_heap_area_t::committed</a></div><divclass="ttdeci">size_t committed</div><divclass="ttdoc">current committed bytes of this area</div><divclass="ttdef"><b>Definition:</b> mimalloc-doc.h:717</div></div>
<divclass="ttc"id="group__analysis_html_ga0d67c1789faaa15ff366c024fcaf6377"><divclass="ttname"><ahref="group__analysis.html#ga0d67c1789faaa15ff366c024fcaf6377">mi_heap_check_owned</a></div><divclass="ttdeci">bool mi_heap_check_owned(mi_heap_t *heap, const void *p)</div><divclass="ttdoc">Check safely if any pointer is part of a heap.</div></div>
<divclass="ttc"id="group__heap_html_gab8631ec88c8d26641b68b5d25dcd4422"><divclass="ttname"><ahref="group__heap.html#gab8631ec88c8d26641b68b5d25dcd4422">mi_heap_set_default</a></div><divclass="ttdeci">mi_heap_t * mi_heap_set_default(mi_heap_t *heap)</div><divclass="ttdoc">Set the default heap to use for mi_malloc() et al.</div></div>