From 2bc52557c59cb67fdb53f9d10600c059b4818d19 Mon Sep 17 00:00:00 2001 From: daanx Date: Wed, 15 Jan 2025 12:31:35 -0800 Subject: [PATCH] add figure to readme for mimalloc-redirect --- bin/readme.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/bin/readme.md b/bin/readme.md index 926f25df..2815f168 100644 --- a/bin/readme.md +++ b/bin/readme.md @@ -25,6 +25,23 @@ There are four requirements to make the overriding work well: list of the final executable (so it can intercept all potential allocations). You can use `minject -l ` to check this if needed. +```cpp +┌──────────────┐ +│ Your Program │ +└────┬─────────┘ + │ + │ mi_version() ┌───────────────┐ ┌───────────────────────┐ + ├──────────────►│ mimalloc.dll ├────►│ mimalloc-redirect.dll │ + │ └──────┬────────┘ └───────────────────────┘ + │ ▼ + │ malloc() etc. ┌──────────────┐ + ├──────────────►│ ucrtbase.dll │ + │ └──────────────┘ + │ + │ + └──────────────► ... +``` + For best performance on Windows with C++, it is also recommended to also override the `new`/`delete` operations (by including [`mimalloc-new-delete.h`](../include/mimalloc-new-delete.h)