Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
daanx committed Dec 17, 2024
1 parent 3feb0d6 commit 6ac636e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions bin/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`).
Expand Down
2 changes: 1 addition & 1 deletion test/test-stress.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]
//
Expand Down

0 comments on commit 6ac636e

Please sign in to comment.