diff --git a/CMakeLists.txt b/CMakeLists.txt index f6968ed7..61217cd1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,11 +47,11 @@ if(OVERRIDE MATCHES "ON") list(APPEND mi_defines MI_MALLOC_OVERRIDE) if(APPLE) if(INTERPOSE MATCHES "ON") - # use interpose on MacOSX + # use interpose on macOS message(STATUS " Use interpose to override malloc (INTERPOSE=ON)") list(APPEND mi_defines MI_INTERPOSE) else() - # use zone's on MacOSX + # use zone's on macOS message(STATUS " Use zone's to override malloc (INTERPOSE=OFF)") list(APPEND mi_sources src/alloc-override-osx.c) endif() diff --git a/doc/mimalloc-doc.h b/doc/mimalloc-doc.h index 184e5c5b..69367e66 100644 --- a/doc/mimalloc-doc.h +++ b/doc/mimalloc-doc.h @@ -648,7 +648,7 @@ 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. -## MacOSX, Linux, BSD, etc. +## macOS, Linux, BSD, etc. We use [`cmake`](https://cmake.org)1 as the build system: @@ -772,14 +772,14 @@ Overriding the standard `malloc` can be done either _dynamically_ or _statically This is the recommended way to override the standard malloc interface. -### Unix, BSD, MacOSX +### Unix, BSD, macOS On these systems we preload the mimalloc shared library so all calls to the standard `malloc` interface are resolved to the _mimalloc_ library. - `env LD_PRELOAD=/usr/lib/libmimalloc.so myprogram` (on Linux, BSD, etc.) -- `env DYLD_INSERT_LIBRARIES=usr/lib/libmimalloc.dylib myprogram` (On MacOSX) +- `env DYLD_INSERT_LIBRARIES=usr/lib/libmimalloc.dylib myprogram` (On macOS) Note certain security restrictions may apply when doing this from the [shell](https://stackoverflow.com/questions/43941322/dyld-insert-libraries-ignored-when-calling-application-through-bash). diff --git a/docs/build.html b/docs/build.html index 79dc2e50..056ce249 100644 --- a/docs/build.html +++ b/docs/build.html @@ -104,7 +104,7 @@ $(document).ready(function(){initNavTree('build.html','');});
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
)
Overriding the standard malloc
can be done either dynamically or statically.
This is the recommended way to override the standard malloc interface.
-On these systems we preload the mimalloc shared library so all calls to the standard malloc
interface are resolved to the mimalloc library.
env LD_PRELOAD=/usr/lib/libmimalloc.so myprogram
(on Linux, BSD, etc.)env DYLD_INSERT_LIBRARIES=usr/lib/libmimalloc.dylib myprogram
(On MacOSX)
env DYLD_INSERT_LIBRARIES=usr/lib/libmimalloc.dylib myprogram
(On macOS)
Note certain security restrictions may apply when doing this from the shell.