Checkout the sources from Github:
Open ide/vs2017/mimalloc.sln
in Visual Studio 2017 and build. The mimalloc
project builds a static library (in out/msvc-x64
), while the mimalloc-override
project builds a DLL for overriding malloc in the entire program.
We use cmake
1 as the build system:
This builds the library as a shared (dynamic) library (.so
or .dylib
), a static library (.a
), and as a single object file (.o
).
> sudo make install
(install the library and header files in /usr/local/lib
and /usr/local/include
)
You can build the debug version which does many internal checks and maintains detailed statistics as:
This will name the shared library as libmimalloc-debug.so
.
Finally, you can build a secure version that uses guard pages, encrypted free lists, etc, as:
This will name the shared library as libmimalloc-secure.so
. Use ccmake
2 instead of cmake
to see and customize all the available build options.
Notes:
sudo apt-get install cmake
sudo apt-get install cmake-curses-gui