mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-03 22:19:32 +03:00
update readme
This commit is contained in:
parent
3feb0d6cea
commit
6ac636e2e2
2 changed files with 6 additions and 5 deletions
|
@ -11,11 +11,12 @@ There are four requirements to make the overriding work robustly:
|
|||
|
||||
2. Link your program explicitly with `mimalloc-override.dll` library.
|
||||
To ensure the `mimalloc-override.dll` is loaded at run-time it is easiest to insert some
|
||||
call to the mimalloc API in the `main` function, like `mi_version()`
|
||||
(or use the `/INCLUDE:mi_version` switch on the linker). See the `mimalloc-override-test` project
|
||||
for an example on how to use this.
|
||||
call to the mimalloc API in the `main` function, like `mi_version()`
|
||||
(or use the `/INCLUDE:mi_version` switch on the linker, or
|
||||
use `#pragma comment(linker, "/include:mi_version")` in some source file).
|
||||
See the `mimalloc-override-test` project for an example on how to use this.
|
||||
|
||||
3. The `mimalloc-redirect.dll` (or `mimalloc-redirect32.dll`, or `mimalloc-redirect-arm64.dll`) must be put
|
||||
3. The `mimalloc-redirect.dll` (x64) (or `mimalloc-redirect32.dll` (x86), or `mimalloc-redirect-arm64.dll` (arm64)) must be put
|
||||
in the same folder as the main `mimalloc-override.dll` at runtime (as it is a dependency of that DLL).
|
||||
The redirection DLL ensures that all calls to the C runtime malloc API get redirected to
|
||||
mimalloc functions (which reside in `mimalloc-override.dll`).
|
||||
|
|
|
@ -23,7 +23,7 @@ terms of the MIT license.
|
|||
#include <assert.h>
|
||||
|
||||
// #define MI_GUARDED
|
||||
#define USE_STD_MALLOC
|
||||
// #define USE_STD_MALLOC
|
||||
|
||||
// > mimalloc-test-stress [THREADS] [SCALE] [ITER]
|
||||
//
|
||||
|
|
Loading…
Add table
Reference in a new issue