microsoft/mimalloc ? reverse-engineered prompt
Reverse engineered prompt
Build me a small, fast general purpose memory allocator in C that can be used as a drop in replacement for malloc and free.
I want it to work on Linux, Windows, and macOS, with a clean public header, a normal build setup, and a test suite that checks basic allocation, freeing, aligned allocation, multiple heaps, and thread safety. It should also support a secure mode with extra safety checks, plus a way to gather stats and debug memory usage.
Please make it easy to build as a static or shared library, and include the usual install files and package config so it can be used by other projects without much effort. If you need current build or platform details, look them up online and follow the latest docs.
Are you gonna build this?
make sure you review the code using coderabbit