Compact general purpose allocator with excellent performance
mimalloc provides CMake targets:
find_package(mimalloc CONFIG REQUIRED)
target_link_libraries(main PRIVATE $<IF:$<TARGET_EXISTS:mimalloc-static>,mimalloc-static,mimalloc>)
On Windows with dynamic linkage, call a mimalloc API function (e.g.
`mi_version()`) to ensure the allocator DLL (`mimalloc.dll`, or
`mimalloc-secure.dll` with the secure feature; `-debug` variants in Debug)
is loaded. Keep the matching `mimalloc-redirect*.dll` alongside it.
See https://github.com/microsoft/mimalloc/blob/dev3/bin/readme.md
Override the standard malloc interface (i.e. define entry points for 'malloc', 'free', etc)
Use full security mitigations (like guard pages, allocation randomization, double-free mitigation, and free-list corruption detection)
v3.6.1#0
!uwp
MIT
Manifest