@@ -15,9 +15,9 @@ is a general purpose allocator with excellent [performance](#performance) charac
1515Initially developed by Daan Leijen for the runtime systems of the
1616[ Koka] ( https://koka-lang.github.io ) and [ Lean] ( https://github.com/leanprover/lean ) languages.
1717
18- Latest release : ` v3.2.8 ` (2026-02-03) release candidate 3, please report any issues .
19- Latest v2 release: ` v2.2.7 ` (2026-01 -15).
20- Latest v1 release: ` v1.9.7 ` (2026-01 -15).
18+ Latest release : ` v3.3.0 ` (2026-04-15) recommended .
19+ Latest v2 release: ` v2.3.0 ` (2026-04 -15) stable .
20+ Latest v1 release: ` v1.9.8 ` (2026-04 -15) legacy .
2121
2222mimalloc is a drop-in replacement for ` malloc ` and can be used in other programs
2323without code changes, for example, on dynamically linked ELF-based systems (Linux, BSD, etc.) you can use it as:
@@ -79,16 +79,23 @@ Enjoy!
7979There are three maintained versions of mimalloc. These are mostly equal except for how the OS memory is handled.
8080New development is mostly on v3, while v1 and v2 are maintained with security and bug fixes.
8181
82- - __ v1__ : initial design of mimalloc (release tags: ` v1.9.x ` , development branch ` dev ` ). Send PR's against this version if possible.
83- - __ v2__ : main mimalloc version. Uses thread-local segments to reduce fragmentation. (release tags: ` v2.2.x ` , development branch ` dev2 ` and ` main ` )
84- - __ v3__ : simplifies the lock-free design of previous versions and improves sharing of
82+ - __ v3__ : recommended: simplifies the lock-free design of previous versions and improves sharing of
8583 memory between threads. On certain large workloads this version may use
8684 (much) less memory. Also supports true first-class heaps (that can allocate from any thread)
8785 and has more efficient heap-walking (for the CPython GC for example).
88- (release tags: ` v3.2.x ` , development branch ` dev3 ` ).
86+ (release tags: ` v3.x ` , development branch ` dev3 ` ).
87+ - __ v2__ : stable mimalloc version. Uses thread-local segments to reduce fragmentation. (release tags: ` v2.x ` , development branch ` dev2 ` and ` main ` )
88+ - __ v1__ : legacy version: initial design of mimalloc (release tags: ` v1.9.x ` , development branch ` dev ` ). Send PR's against this version if possible.
8989
9090### Releases
91-
91+ * 2026-04-15, ` v1.9.8 ` , ` v2.3.0 ` , ` v3.3.0 ` : fix visiting of full pages during collection (performance),
92+ fix THP alignment (performance), fix arm64 cross-compilation on Windows, enable guard pages in debug mode,
93+ always use uncommitted areas between arenas (security), enable static overloading of ` malloc ` etc. on Windows with the
94+ static CRT (by @Noxybot ), fix TLS slot leak on Windows (v3), enable clean DLL load/unload with statically linked
95+ mimalloc (v3), fix race in ` mi_heap_destroy ` (v3), by default put page meta info separate from allocated
96+ objects (v3,security), fix C++ overrides for emscripten. Various bugs found by DeepTest include:
97+ fix offset for ` mi_heap_realloc_aligned ` , fix ` mi_(w)dupenv_s ` buffer size, fix potential overflow in size options,
98+ and error codes for ` mi_reallocarr(ay) ` .
9299* 2026-02-03, ` v3.2.8 ` (rc3): Fix thread reinitialize issue on macOS. Fix SIMD codegen bug on older
93100 GCC versions. Extend Windows TLS slot limit from 64 to 1088. Report commit statistics more precise.
94101 Fixes issue in free-page search in arenas.
@@ -356,7 +363,7 @@ Further options for large workloads and services:
356363
357364- ` MIMALLOC_ALLOW_THP=1 ` : By default always allow transparent huge pages (THP) on Linux systems. On Android only this is
358365 by default off. When set to ` 0 ` , THP is disabled for the process that mimalloc runs in. If enabled, mimalloc also sets
359- the ` MIMALLOC_MINIMAL_PURGE_SIZE ` in v3 to 2MiB to avoid potentially breaking up transparent huge pages.
366+ the ` MIMALLOC_MINIMAL_PURGE_SIZE ` in v3 to 2MiB to avoid potentially breaking up transparent huge pages when purging memory .
360367- ` MIMALLOC_USE_NUMA_NODES=N ` : pretend there are at most ` N ` NUMA nodes. If not set, the actual NUMA nodes are detected
361368 at runtime. Setting ` N ` to 1 may avoid problems in some virtual environments. Also, setting it to a lower number than
362369 the actual NUMA nodes is fine and will only cause threads to potentially allocate more memory across actual NUMA
@@ -416,13 +423,14 @@ various checks are done at runtime to catch development errors.
416423## Guarded Mode
417424
418425<span id =" guarded " >_ mimalloc_ can be build in guarded mode using the ` -DMI_GUARDED=ON ` flags in ` cmake ` .</span >
419- This enables placing OS guard pages behind certain object allocations to catch buffer overflows as they occur.
426+ This is ` ON ` by default when building a debug version of mimalloc.
427+ Guarded mode enables placing OS guard pages behind certain object allocations to catch buffer overflows as they occur.
420428This can be invaluable to catch buffer-overflow bugs in large programs. However, it also means that any object
421429allocated with a guard page takes at least 8 KiB memory for the guard page and its alignment. As such, allocating
422430a guard page for every allocation may be too expensive both in terms of memory, and in terms of performance with
423431many system calls. Therefore, there are various environment variables (and options) to tune this:
424432
425- - ` MIMALLOC_GUARDED_SAMPLE_RATE=N ` : Set the sample rate to ` N ` (by default 4000 ). This mode places a guard page
433+ - ` MIMALLOC_GUARDED_SAMPLE_RATE=N ` : Set the sample rate to ` N ` (by default 0 ). This mode places a guard page
426434 behind every ` N ` suitable object allocations (per thread). Since the performance in guarded mode without placing
427435 guard pages is close to release mode, this can be used to enable guard pages even in production to catch latent
428436 buffer overflow bugs. Set the sample rate to ` 1 ` to guard every object, and to ` 0 ` to place no guard pages at all.
@@ -541,6 +549,9 @@ This is provided by [`mimalloc-override.h`](include/mimalloc-override.h). This o
541549reliably though if all sources are
542550under your control or otherwise mixing of pointers from different heaps may occur!
543551
552+ Note: recently we also enabled static overloading on Windows. In that case you need
553+ to link with the static CRT _ release_ runtime (` /MT ` ) and link with the static
554+ ` mimalloc(-debug).obj ` (to take precendence over the definitions in the CRT library).
544555
545556# Tools
546557
0 commit comments