Skip to content

Commit 580518c

Browse files
committed
prepare for release, bump version to v3.3.0
2 parents 71e7a48 + 8602b5f commit 580518c

8 files changed

Lines changed: 31 additions & 20 deletions

File tree

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
runs-on: ${{ matrix.os }}
2020
strategy:
2121
matrix:
22-
branch: [dev,dev2,dev3]
22+
branch: [v1.9.8,v2.3.0,v3.3.0] # [dev,dev2,dev3]
2323
# we build on the oldest ubuntu version for better binary compatibility.
2424
os: [windows-latest, macOS-latest, macos-15-intel, ubuntu-22.04, ubuntu-22.04-arm]
2525

cmake/mimalloc-config-version.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
set(mi_version_major 3)
2-
set(mi_version_minor 2)
3-
set(mi_version_patch 8)
2+
set(mi_version_minor 3)
3+
set(mi_version_patch 0)
44
set(mi_version ${mi_version_major}.${mi_version_minor})
55

66
set(PACKAGE_VERSION ${mi_version})

contrib/vcpkg/portfile.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ vcpkg_from_github(
33
REPO microsoft/mimalloc
44
HEAD_REF master
55

6-
# The "REF" can be a commit hash, branch name (dev3), or a version (v3.2.7).
6+
# The "REF" can be a commit hash, branch name (dev3), or a version (v3.3.0).
77
REF "v${VERSION}"
88

99
# The sha512 is the hash of the tar.gz bundle.

contrib/vcpkg/vcpkg.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mimalloc",
3-
"version": "3.2.8",
3+
"version": "3.3.0",
44
"port-version": 0,
55
"description": "Compact general purpose allocator with excellent performance",
66
"homepage": "https://github.com/microsoft/mimalloc",

doc/release-notes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ Notes:
1010
- Generally it is recommended to download sources (or use `vcpkg` etc.) and build mimalloc as
1111
part of your project.
1212
- Source releases can also be downloaded directly from github by the tag.
13-
For example <https://github.com/microsoft/mimalloc/archive/v3.2.8.tar.gz>.
13+
For example <https://github.com/microsoft/mimalloc/archive/v3.3.0.tar.gz>.
1414
- Binary releases include a release-, debug-, and secure build.
1515
- Linux binaries are built on Ubuntu 22.

include/mimalloc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ terms of the MIT license. A copy of the license can be found in the file
88
#ifndef MIMALLOC_H
99
#define MIMALLOC_H
1010

11-
#define MI_MALLOC_VERSION 3208 // major + minor + 2 digits patch
11+
#define MI_MALLOC_VERSION 30300 // major + 2 digits minor + 2 digits patch
1212

1313
// ------------------------------------------------------
1414
// Compiler specific attributes

readme.md

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ is a general purpose allocator with excellent [performance](#performance) charac
1515
Initially 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

2222
mimalloc is a drop-in replacement for `malloc` and can be used in other programs
2323
without code changes, for example, on dynamically linked ELF-based systems (Linux, BSD, etc.) you can use it as:
@@ -79,16 +79,23 @@ Enjoy!
7979
There are three maintained versions of mimalloc. These are mostly equal except for how the OS memory is handled.
8080
New 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.
420428
This can be invaluable to catch buffer-overflow bugs in large programs. However, it also means that any object
421429
allocated with a guard page takes at least 8 KiB memory for the guard page and its alignment. As such, allocating
422430
a guard page for every allocation may be too expensive both in terms of memory, and in terms of performance with
423431
many 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
541549
reliably though if all sources are
542550
under 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

src/options.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,8 @@ void _mi_options_post_init(void) {
217217
mi_decl_export void mi_options_print_out(mi_output_fun* out, void* arg) mi_attr_noexcept
218218
{
219219
// show version
220-
const int vermajor = MI_MALLOC_VERSION/1000;
221-
const int verminor = (MI_MALLOC_VERSION%1000)/100;
220+
const int vermajor = MI_MALLOC_VERSION/10000;
221+
const int verminor = (MI_MALLOC_VERSION%10000)/100;
222222
const int verpatch = (MI_MALLOC_VERSION%100);
223223
_mi_fprintf(out, arg, "v%i.%i.%i%s%s (built on %s, %s)\n", vermajor, verminor, verpatch,
224224
#if defined(MI_CMAKE_BUILD_TYPE)

0 commit comments

Comments
 (0)