Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
316 commits
Select commit Hold shift + click to select a range
6afcf9d
move pages_direct in front for a zero offset in malloc
daanx Aug 14, 2026
40518eb
add full secure to CI
daanx Aug 14, 2026
a6fd08b
increase TSAN iterations to 500 in the CI
daanx Aug 14, 2026
5c625a9
increase TSAN iterations to 500 in the CI
daanx Aug 14, 2026
28162ad
Add theap stats retrieval
res2k Aug 14, 2026
388b99a
add debug check for invalid pointers in aligned mode
daanx Aug 14, 2026
d31778f
Merge pull request #1365 from devnexen/numa_fix
daanx Aug 14, 2026
1035bbe
Merge pull request #1366 from res2k/theap-stats
daanx Aug 15, 2026
6762739
add extra debug checks to track spurious CI failures
daanx Aug 15, 2026
af7bfec
no parens on MI_SMALL_WSIZE_MAX
daanx Aug 11, 2026
2d659d7
Merge branch 'dev' into dev3
daanx Aug 15, 2026
2aa191b
fix aligned address hints for large alignments
daanx Aug 15, 2026
8b81a1f
ensure enough meta pages are committed for OS allocated pages
daanx Aug 15, 2026
34ec0c1
fix compilation error
daanx Aug 15, 2026
342cdf1
fix commit stats for partial commits
daanx Aug 16, 2026
90b13d7
set heaps test to eager arena commit to find rare Debug CI failure
daanx Aug 16, 2026
e927d7b
optimize page layout for malloc/free
daanx Aug 18, 2026
15ea251
fix asan check
daanx Aug 18, 2026
9cc85fc
make page commit on demand more fine grained
daanx Aug 18, 2026
fd8f92e
use page_offset instread of zoffset
daanx Aug 18, 2026
7c66c3f
minor optimization
daanx Aug 18, 2026
b2ef742
remove incorrect assertion
daanx Aug 18, 2026
53b364d
all free to reabandon pages even if the thread is uninitialized, issu…
daanx Aug 18, 2026
2c22450
cfree returns a boolean (true on succes)
daanx Aug 19, 2026
559ffde
bump version to v1.15.0
daanx Aug 19, 2026
71cfd02
bump version to v3.5.0
daanx Aug 19, 2026
dac1f4b
update readme
daanx Aug 19, 2026
18b0867
Merge branch 'dev' into dev3
daanx Aug 19, 2026
cd69707
Merge pull request #1369 from microsoft/dev3
daanx Aug 19, 2026
604c252
fix compilation error with clang on windows, issue #1370
daanx Aug 19, 2026
0a4ea88
possible fix linking error with clang on windows, issue #1370
daanx Aug 20, 2026
0424ab2
Pin GitHub Actions to full-length commit SHAs, see PR #1368
daanx Aug 20, 2026
0b01a64
Pin further GitHub Actions to full-length commit SHAs, see PR #1368
daanx Aug 20, 2026
0ea1bb2
add plain clang to win32 tests, #1370
daanx Aug 20, 2026
870c30d
nice names for some CI steps
daanx Aug 21, 2026
a15a51d
fix assertion check in realloc, issue #1371
daanx Aug 21, 2026
0a0c296
improve cache associativity
daanx Aug 22, 2026
dc71e90
remove cookie field
daanx Aug 22, 2026
cda82f9
check double free's even without padding
daanx Aug 22, 2026
622d421
fix natural alignment
daanx Aug 22, 2026
d962692
workflows: Enable clang-cl tests for ARM
res2k Aug 28, 2026
0e9c24f
workflows: Add MI_NO_USE_CXX variants for Windows/clang tests
res2k Aug 28, 2026
a032d35
workflows: Add MI_NO_USE_CXX variants for MSVC tests
res2k Aug 28, 2026
80dbcb4
workflows: Add clang-cl tests targetting the native architecture
res2k Aug 28, 2026
819be2c
workflows: Add matrix entry for C vs C++
res2k Aug 28, 2026
aca9e6e
experiment codegen on x64
daanx Aug 28, 2026
7cca1b5
Work around clang-cl missing ldar, stlr, see PR #1379 by @res2k
daanx Aug 28, 2026
cfab42c
Configure monthly Dependabot updates, see PR #1376
daanx Aug 28, 2026
8cc8a2a
Allow for C mode building w/ MSVC or clang-cl, pr #1380 by @res2k
daanx Aug 28, 2026
bd2423d
merge from dev
daanx Aug 28, 2026
69f9b07
improve free codegen
daanx Aug 28, 2026
d3dfc39
fix dependabot location
daanx Aug 28, 2026
c1bc3f4
Merge branch 'dev' into dev3
daanx Aug 28, 2026
7a85d4d
Merge pull request #1381 from res2k/more-clang-cl-tests
daanx Aug 28, 2026
f0194a5
improve free codegen
daanx Aug 28, 2026
3dfa6aa
fix test paths
daanx Aug 28, 2026
c2259fb
add fail fast false to workflow
daanx Aug 28, 2026
155fef1
improve free codegen
daanx Aug 28, 2026
e2dd60c
reduce c/c++ test variants a bit
daanx Aug 28, 2026
8006b34
reduce c/c++ test variants a bit
daanx Aug 28, 2026
fe5a54c
faster free_small
daanx Aug 28, 2026
eab1ebe
improve free_small
daanx Aug 29, 2026
06fb5b0
comments
daanx Aug 29, 2026
2deba9e
add default to MI_USE_CXX option
daanx Aug 29, 2026
1069215
merge from dev
daanx Aug 29, 2026
9c2a0d2
fix guarded build assertions
daanx Aug 29, 2026
52c0fed
fix test.yml
daanx Aug 29, 2026
081728d
simplify test.yml
daanx Aug 29, 2026
5787e6b
allow alpine tests to fail in test.yml
daanx Aug 29, 2026
6070a8d
remove linux pthreads asm
daanx Aug 29, 2026
f0d57e8
fix test.yml
daanx Aug 29, 2026
61f993b
add mi_free_csize_nonnull
daanx Aug 29, 2026
116733a
update documentation
daanx Aug 29, 2026
dcb888e
Merge branch 'dev' into dev3
daanx Aug 29, 2026
430db36
improve mi_free_size error messages
daanx Aug 29, 2026
8c1d13f
improve codegen on aarch64
daanx Aug 29, 2026
8b5ddc4
test mi_free_small_nonnull codegen
daanx Aug 29, 2026
066d25a
fix mi_free_small_nonnull codegen on aarch64
daanx Aug 29, 2026
dc48dd6
fix arm64 compile
daanx Aug 29, 2026
6e337d2
improve mi_free codegen
daanx Aug 29, 2026
7e0b273
fix arm64 compile
daanx Aug 29, 2026
4df1f0d
fix arm64 compile
daanx Aug 29, 2026
75a968a
fix arm64 compile
daanx Aug 29, 2026
93fb234
remove superfluous mi_likely
daanx Aug 30, 2026
a1036ba
ensure MI_OPT_ARCH=OFF is respected on arm64 (issue #1382)
daanx Aug 30, 2026
582711e
merge from dev
daanx Aug 30, 2026
0f80c39
Allow specicic architecture to be passed to MI_OPT_ARCH; default to a…
daanx Aug 30, 2026
c42fb1a
fix MI_OPT_ARCH on arm32
daanx Aug 30, 2026
2781629
fix MI_OPT_ARCH on arm32
daanx Aug 30, 2026
a51fe32
add rva23 to ci tests
daanx Aug 30, 2026
784f057
Use generator expression to get path for generated object file
res2k Aug 30, 2026
9b6a914
Improve behavior on multi-config generators
res2k Aug 30, 2026
fcb80d1
fix rv* architecture match
daanx Aug 30, 2026
c0dfd63
fix rv* architecture match
daanx Aug 30, 2026
3fd9b1c
fix assertion warning
daanx Aug 30, 2026
4df4e21
add zalasr test to risv
daanx Aug 30, 2026
9f3fc2b
add clang to riscv CI
daanx Aug 30, 2026
17aa0af
add clang++ to riscv CI
daanx Aug 30, 2026
5a4f73d
remove clang++ from riscv CI
daanx Aug 30, 2026
30de2b4
fix sizeof(void*) test in cmake
daanx Aug 30, 2026
9cf99c7
fix __riscv macro misspelling
daanx Aug 30, 2026
f60b4cf
fix: mi_theap_zalloc_csize zeroes its large branch
lenamonj Aug 31, 2026
97f632d
Merge pull request #1385 from lenamonj/fix-zalloc-csize-large
daanx Aug 31, 2026
e73740d
fix signature of mi_free_small_nonnull
daanx Aug 31, 2026
451aff1
add v3 to docs
daanx Aug 31, 2026
68bd1cf
Merge branch 'dev' into dev3
daanx Aug 31, 2026
43b9da6
refactor mi_page_malloc_zero
daanx Aug 31, 2026
1bc0403
remove dead code
daanx Aug 31, 2026
92cf63e
bump to v1.15.1
daanx Sep 1, 2026
3bfdc2f
add MI_ALLOW_THP=[OFF,ON,FULL] and use the default of FULL for Linux …
daanx Sep 1, 2026
08939b9
merge from dev, bump version to v3.5.1
daanx Sep 1, 2026
dfe481f
bump vcpkg version to v3.5.1
daanx Sep 1, 2026
f16b45c
update readme
daanx Sep 1, 2026
34fbd7e
merge from dev
daanx Sep 1, 2026
cb5aedc
update release notes
daanx Sep 1, 2026
cc8c098
Merge branch 'dev' into dev3
daanx Sep 1, 2026
c9cc339
Merge pull request #1387 from microsoft/dev3
daanx Sep 1, 2026
3663400
Bump the minor-and-patch group with 2 updates
dependabot[bot] Sep 1, 2026
aac7587
Bump actions/stale from 10.4.0 to 11.0.0
dependabot[bot] Sep 1, 2026
c1915b3
Bump actions/checkout from 6.1.0 to 7.0.1
dependabot[bot] Sep 1, 2026
6c45ba0
wip: initial fast detailed stats
daanx Sep 2, 2026
2dcd92a
_mi_subproc: fall back to the main subproc when tld->subproc is not y…
hosking Sep 2, 2026
7159900
improve efficient stats
daanx Sep 2, 2026
2987eba
add MI_STAT option to cmake
daanx Sep 2, 2026
2bb2714
nice stat display
daanx Sep 2, 2026
7dbb077
add os_abandoned and os_allocated stats
daanx Sep 2, 2026
b4c945e
add comments
daanx Sep 2, 2026
61cb91d
disable assertion in mi_free_try_collect_mt for now
daanx Sep 2, 2026
bc1ac97
missing comma on 32-bit
daanx Sep 2, 2026
23a5db4
prevent mi_page_associated_theap from reading a free'd theap
daanx Sep 2, 2026
27fbcd8
add option collect_merges_stats to be able disable automatic stat mer…
daanx Sep 2, 2026
0d673d1
add mi_theap_stats_merge_to_heap
daanx Sep 2, 2026
636d6b4
wip: initial design for profiling integration
daanx Sep 3, 2026
6aebb33
wip: initial design for profiling integration
daanx Sep 3, 2026
4d1a229
increase page stat updates when a profiler is active
daanx Sep 3, 2026
70af0eb
clean up guarded and profiled block handling; allow aligned blocks in…
daanx Sep 3, 2026
3d3c55b
increase test threshold for profile
daanx Sep 3, 2026
56b1a37
fix access to stale page->theap
daanx Sep 3, 2026
cb30f64
add default for MI_OPT_FREE_SMALL option
daanx Sep 3, 2026
6725ca9
avoid re-visiting full pages in mi_page_queue_find_free_ex
angelica-moreira Sep 3, 2026
7e7769c
return new expected value from collect_partly
daanx Sep 4, 2026
5eead3b
merge from dev3
daanx Sep 4, 2026
3257a7f
wip: rework profile and guarded as sampled allocations
daanx Sep 4, 2026
64955e2
wip: improve profile and guarded as sampled allocations
daanx Sep 4, 2026
e80f3f9
fix warnings and should sample check
daanx Sep 4, 2026
8e4cfbc
Merge pull request #1391 from hosking/fix-subproc-null-during-init
daanx Sep 5, 2026
542a966
avoid re-visiting full pages in mi_page_queue_find_free_ex
angelica-moreira Sep 3, 2026
866c811
return new expected value from collect_partly
daanx Sep 4, 2026
f3dbaf1
add constructor priority for gcc on non-macOS (see also #1391)
daanx Sep 5, 2026
0436ebc
better sample accounting where we account properly if the generic pat…
daanx Sep 5, 2026
ed0d501
slightly better codegen for profile==2
daanx Sep 5, 2026
e349fc3
comments
daanx Sep 5, 2026
525f2c9
fix countdown counter assertion
daanx Sep 5, 2026
2682e06
readjust sample count in case of an error
daanx Sep 5, 2026
929a7be
set default MI_PROFILE to 1
daanx Sep 5, 2026
26db822
possible fix for fine-grained proile crash
daanx Sep 5, 2026
bde3e6a
fix assertion in mi_malloc_sample
daanx Sep 5, 2026
7dec07a
don't sample the meta theap
daanx Sep 5, 2026
1e73e16
improve sample countdown check for msvc
daanx Sep 5, 2026
ab40460
improve codegen for profile==2 on arm64
daanx Sep 5, 2026
aa1e6a2
improve codegen for mi_free_small on gcc
daanx Sep 5, 2026
2520d4f
use 64-bit for total requested
daanx Sep 5, 2026
5cfedfb
improve codegen for mi_zalloc
daanx Sep 6, 2026
e37102e
faster memzero_block
daanx Sep 6, 2026
44fd9ab
update vs2022 projects
daanx Sep 6, 2026
5395895
Merge branch 'dev3-profile' of https://github.com/microsoft/mimalloc …
daanx Sep 6, 2026
35a7b47
use fast memzero on x64 as well
daanx Sep 6, 2026
282d188
cleanup mi_memzero_block
daanx Sep 7, 2026
5ed8e01
remove old block_zero
daanx Sep 7, 2026
b79d763
Merge branch 'dev3-profile' of https://github.com/microsoft/mimalloc …
daanx Sep 7, 2026
eaaed42
fix mi_memzero_block for msvc x64
daanx Sep 7, 2026
f95e0e2
guard the reset range in mi_segment_huge_page_alloc
devnexen Sep 7, 2026
f73b463
adjust sampling countdown more aggressively
daanx Sep 9, 2026
b614a94
better cmake options for MI_PROFILE, and MI_GUARDED
daanx Sep 9, 2026
d586650
rename MI_STAT to MI_STATS
daanx Sep 9, 2026
60dee63
fix guarded sampling
daanx Sep 9, 2026
fc4665d
reorganize sampling code
daanx Sep 9, 2026
d94818a
fix initialization on 32-bit
daanx Sep 9, 2026
01fe31e
improve heap_(zm)alloc codegen
daanx Sep 9, 2026
9dd0d61
fix attribute order
daanx Sep 9, 2026
c638b42
provide wsize allocation
daanx Sep 9, 2026
9c8ad51
fix attribute order
daanx Sep 10, 2026
d3ebb2b
fix profile for on_free == NULL
daanx Sep 10, 2026
2a5caea
remove wmalloc_nonnull variants
daanx Sep 10, 2026
e1bd803
use sizeof(size_t) = machine word consistently (instead of sizeof(int…
daanx Sep 10, 2026
2317ff6
use sizeof(size_t) = machine word consistently (instead of sizeof(int…
daanx Sep 10, 2026
5d2916a
fix assertion
daanx Sep 10, 2026
39f4509
theap_malloc functions can assume a non-null theap
daanx Sep 10, 2026
6590d34
add profiler heap
daanx Sep 10, 2026
e1c568d
fix c++ compilation
daanx Sep 10, 2026
2d53d6a
fix double free check without padding
daanx Sep 10, 2026
c31f719
cleanup profiler api
daanx Sep 10, 2026
8b8be2f
fix MI_DEBUG=OFF option
daanx Sep 10, 2026
48f5050
azure pipeline failure test
daanx Sep 11, 2026
ba3464b
check azure pipeline failure
daanx Sep 11, 2026
c449187
fix padding assertions
daanx Sep 11, 2026
e2a957d
fix linux compilation
daanx Sep 11, 2026
3110f3f
test azure pipeline failure
daanx Sep 11, 2026
8a8b476
test azure pipeline failure
daanx Sep 11, 2026
84f86e7
test azure pipeline failure
daanx Sep 11, 2026
ec2f2f2
test azure pipeline failure
daanx Sep 11, 2026
0fef886
test azure pipeline failure
daanx Sep 11, 2026
4f9608f
test azure pipeline failure
daanx Sep 11, 2026
2c2038b
test azure pipeline failure
daanx Sep 11, 2026
e3c2a9c
fix non-guarded build still guarding objects when MIMALLOC_GUARDED_RA…
daanx Sep 11, 2026
1148e5c
roll back azure pipeline test code
daanx Sep 11, 2026
68d4a8c
disable memzero128
daanx Sep 11, 2026
d545167
fix padding output
daanx Sep 11, 2026
d09cac6
fix alignment hint
daanx Sep 11, 2026
e4d2cc7
fix alignment hint
daanx Sep 11, 2026
209c435
fix alignment hint
daanx Sep 11, 2026
8e507df
increase portability of the memzero128 code
daanx Sep 11, 2026
ee15bb8
remove wrong assertion
daanx Sep 11, 2026
117d439
fix aligned assumption
daanx Sep 11, 2026
4c71dab
merge upstream/dev3 (272 commits, through 117d4391)
Jarred-Sumner Sep 11, 2026
df377d0
init: release the dynamic thread locals after leaving the park, not b…
Jarred-Sumner Sep 11, 2026
9cc90aa
subproc: the meta theap of a new sub-process does not abandon pages a…
Jarred-Sumner Sep 11, 2026
8fa2762
windows: always compile as C++ with an MSVC compatible compiler
Jarred-Sumner Sep 11, 2026
19c7400
fork: the child does not inherit a running hole sweep; test-park-hand…
Jarred-Sumner Sep 11, 2026
e98ec96
test-park-handoff: the forked child reports where it faulted
Jarred-Sumner Sep 11, 2026
49600a1
enable generic memzero_block; remove rep stosb/movsb
daanx Sep 11, 2026
19c9368
improve ptr_unalign check
daanx Sep 11, 2026
6c1821d
fix 32-bit compilation warnings
daanx Sep 11, 2026
d68195c
always unalign pointers passed to mi_usable_size
daanx Sep 11, 2026
61d086f
fix urealloc_invalid test
daanx Sep 11, 2026
e35400b
gen asm for arm32 in CI
daanx Sep 11, 2026
e688ee5
check for execinfo.h
daanx Sep 11, 2026
d227b4f
Merge pull request #1394 from devnexen/segment_cal_fix
daanx Sep 11, 2026
1fa2fd9
update release notes
daanx Sep 1, 2026
3309f1f
merge from dev
daanx Sep 11, 2026
439dc27
associate process init theap with thread-done key, pr #1393
daanx Sep 11, 2026
7dfe051
Merge pull request #1390 from microsoft/dependabot/github_actions/act…
daanx Sep 11, 2026
1aae212
Merge pull request #1389 from microsoft/dependabot/github_actions/act…
daanx Sep 11, 2026
f2eb4bd
Merge pull request #1388 from microsoft/dependabot/github_actions/min…
daanx Sep 12, 2026
615a436
upload arm32 asm
daanx Sep 12, 2026
d43d7c6
Merge pull request #1384 from res2k/dev3-multi-config
daanx Sep 12, 2026
cc82d81
small fixes for multi-config cmake
daanx Sep 12, 2026
bd33550
use $<LOWER_CASE instead of $<STRING:TOLOWER for better cmake compat
daanx Sep 12, 2026
4db3055
bump version to v1.15.2
daanx Sep 12, 2026
f03c543
merge from dev, bump version to v3.5.2
daanx Sep 12, 2026
636510a
fix wrong small free size alignment
daanx Sep 12, 2026
876ea41
merge bun-dev3-v2 (forced purge waits, purge behind a pass, purge gua…
Jarred-Sumner Sep 13, 2026
47dd31f
merge upstream/dev3 (29 commits, through 636510a3, v3.5.2)
Jarred-Sumner Sep 13, 2026
3c1952b
free: mi_usable_size takes its fast path again; an overflow is not re…
Jarred-Sumner Sep 13, 2026
9e85e9f
test-heap-release-mt: free what stayed live in a released heap
Jarred-Sumner Sep 13, 2026
7aae82a
test: the purge tests ask for a purge unit of one OS page, not 64 KiB
Jarred-Sumner Sep 13, 2026
fe2a5e5
test-heap-release-mt: the owner keeps working while another thread de…
Jarred-Sumner Sep 13, 2026
b5bc53f
cmake: test-heap-release-mt runs with guarded sampling like the other…
Jarred-Sumner Sep 13, 2026
93eb9c7
fork: no arena purge pass runs across a fork()
Jarred-Sumner Sep 13, 2026
5af105d
alloc, free: update the packed used count with one instruction on memory
Jarred-Sumner Sep 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
groups:
minor-and-patch:
patterns: ["*"]
update-types: ["minor", "patch"]
8 changes: 4 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ permissions:
contents: write

env:
RELEASE: Release v3.4.5
RELEASE: Release v3.5.2
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true

name: Release
Expand All @@ -19,14 +19,14 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
branch: [v3.4.5, v2.4.5, v1.9.15] # [dev,dev2,dev3]
branch: [v3.5.2, v2.5.2, v1.15.2] # [dev,dev2,dev3]
# we build on the oldest ubuntu version for better binary compatibility.
os: [windows-latest, macOS-latest, macos-15-intel, ubuntu-22.04, ubuntu-22.04-arm]

steps:
# Checkout: https://github.com/actions/checkout
- name: Checkout repository
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ matrix.branch }}
fetch-tags: true
Expand All @@ -45,7 +45,7 @@ jobs:

# Create a release: https://github.com/softprops/action-gh-release (MIT license)
- name: Release
uses: softprops/action-gh-release@3d0d9888cb7fd7b750713d6e236d1fcb99157228 # v3.0.2
uses: softprops/action-gh-release@efb35369e0ad2afab669f228072c1b0d510eae64 # v3.0.3
if: ${{ env.RELEASE != '' && env.RELEASE != 'no' }}
with:
name: ${{ env.RELEASE }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/stale.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
on:
workflow_dispatch: # allow running the workflow manually
schedule:
- cron: "15 21 * * *" # minute, hour, day (1-31), month (1-12), day of the week (0 - 6 or SUN-SAT)
- cron: "01 21 * * *" # minute, hour, day (1-31), month (1-12), day of the week (0 - 6 or SUN-SAT)

name: Close inactive issues
jobs:
Expand All @@ -11,7 +11,7 @@ jobs:
issues: write
pull-requests: write
steps:
- uses: actions/stale@1e223db275d687790206a7acac4d1a11bd6fe629 # v10.4.0
- uses: actions/stale@4391f3da665fdf50b6810c1a66712fb9ba21aa93 # v11.0.0
with:
days-before-issue-stale: 360
days-before-issue-close: 14
Expand Down
253 changes: 158 additions & 95 deletions .github/workflows/test.yaml

Large diffs are not rendered by default.

653 changes: 469 additions & 184 deletions CMakeLists.txt

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ jobs:
CC: clang
CXX: clang++
BuildType: debug-asan-clang
cmakeExtraArgs: -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON -DMI_TRACK_ASAN=ON
cmakeExtraArgs: -DCMAKE_BUILD_TYPE=RelWithDebInfo -DMI_TRACK_ASAN=ON
Debug UBSAN Clang:
CC: clang
CXX: clang++
Expand Down Expand Up @@ -156,6 +156,7 @@ jobs:
displayName: CTest
env:
MIMALLOC_GUARDED_SAMPLE_RATE: 1000
MIMALLOC_VERBOSE: 2
# - upload: $(Build.SourcesDirectory)/$(BuildType)
# artifact: mimalloc-ubuntu-$(BuildType)

Expand Down Expand Up @@ -188,6 +189,7 @@ jobs:
- script: ctest --verbose --timeout 240
workingDirectory: $(BuildType)
displayName: CTest

# - upload: $(Build.SourcesDirectory)/$(BuildType)
# artifact: mimalloc-macos-$(BuildType)

Expand Down
2 changes: 1 addition & 1 deletion cmake/mimalloc-config-version.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set(mi_version_major 3)
set(mi_version_minor 5)
set(mi_version_patch 0)
set(mi_version_patch 2)
set(mi_version ${mi_version_major}.${mi_version_minor})

set(PACKAGE_VERSION ${mi_version})
Expand Down
2 changes: 1 addition & 1 deletion contrib/vcpkg/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ vcpkg_from_github(
REPO microsoft/mimalloc
HEAD_REF master

# The "REF" can be a commit hash, branch name (dev3), or a version (v3.5.0).
# The "REF" can be a commit hash, branch name (dev3), or a version (v3.5.1).
REF "v${VERSION}"

# The sha512 is the hash of the tar.gz bundle.
Expand Down
2 changes: 1 addition & 1 deletion contrib/vcpkg/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mimalloc",
"version": "3.5.0",
"version": "3.5.1",
"port-version": 0,
"description": "Compact general purpose allocator with excellent performance",
"homepage": "https://github.com/microsoft/mimalloc",
Expand Down
70 changes: 57 additions & 13 deletions doc/mimalloc-doc.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,18 @@ Further information:

/// Free previously allocated memory.
/// The pointer `p` must have been allocated before (or be \a NULL).
/// @param p pointer to free, or \a NULL.
/// @param p pointer to the block that is freed, or \a NULL.
/// See also mi_cfree() for a checked free that validates the pointer
/// before free-ing.
/// @see mi_cfree()
void mi_free(void* p);

/// Checked `free`: just as mi_free() but always checks if the pointer `p` belongs to our heap
/// @param p pointer to a block that is freed, or any other arbitrary pointer.
/// This is safe to use when a pointer might be invalid or allocated by
/// another allocator (in which case the pointer is ignored and not freed).
void mi_cfree(void* p);

/// Allocate \a size bytes.
/// @param size number of bytes to allocate.
/// @returns pointer to the allocated memory or \a NULL if out of memory.
Expand Down Expand Up @@ -404,19 +413,20 @@ void* mi_realloc_aligned_at(void* p, size_t newsize, size_t alignment, size_t of
/// \}

/// \defgroup constantsize Constant size allocation
/// Constant size allocation and freeing
/// Inlined definitions for onstant size allocation and freeing.
/// If the size is constant, it can pick statically between
/// mi_malloc() and mi_malloc_small().
/// For example:
/// ```
/// long* p = (long*)mi_malloc_csize(sizeof(long))
/// ```
/// On __v3__ these can improve performance as they will statically
/// use mi_malloc_small(), mi_free_small(), etc. when possible.
/// On __v3__ these can improve performance.
/// This is especially useful for compilers and runtimes where the
/// the size is often statically known. These functions can be used
/// even when the size is not constant but then there is no performance benefit.
/// \{

/// @brief Allocate a constant size object.
/// @brief __v3__: Allocate a constant size object.
/// @param size A (compile-time) constant size.
/// @return A pointer to an allocated block of size \a size bytes.
/// @see mi_free_csize()
Expand All @@ -429,13 +439,22 @@ void* mi_theap_malloc_csize(mi_theap_t* theap, size_t size);

void* mi_theap_zalloc_csize(mi_theap_t* theap, size_t size);

/// @brief Free a pointer with a known constant size.
/// @brief __v3__: Free a pointer with a known constant size.
/// @param p The pointer to the allocated block (or \a NULL )
/// @param size The (compile time constant) size with which the pointer was allocated.
/// @param size The size with which the pointer was allocated.
/// @see mi_malloc_csize()
/// @see mi_free_size()
/// @see mi_free_size_nonnull()
void mi_free_csize(void* p, size_t size);

/// @brief __v3__: Free a non-null pointer with a known constant size.
/// @param p The pointer to the allocated block (cannot be \a NULL !)
/// @param size The size with which the pointer was allocated.
/// @see mi_malloc_csize()
/// @see mi_free_size()
/// @see mi_free_size_nonnull()
void mi_free_csize_nonnull(void* p, size_t size);

/// \}

/// \defgroup zeroinit Zero initialized re-allocation
Expand Down Expand Up @@ -1056,12 +1075,13 @@ void* mi_zalloc_small(size_t size);

/// __v3__: Can be used to free an object that was allocated with mi_malloc_small() or
/// any allocation with a size < MI_SMALL_SIZE_MAX()
/// @param p Pointer that was returned from #mi_malloc_small et al.
/// @param p Pointer that was returned from #mi_malloc_small et al. (or \a NULL )
/// @details
/// This function is meant for use in run-time systems for best
/// performance and does not check if the pointer was _indeed_ allocated
/// as a small object -- use with care!
///
/// @see mi_free_small_nonnull()
/// @see mi_malloc_small()
/// @see mi_zalloc_small()
/// @see mi_heap_malloc_small()
Expand All @@ -1070,6 +1090,23 @@ void* mi_zalloc_small(size_t size);
/// @see mi_theap_zalloc_small()
void mi_free_small(void* p);

/// __v3__: Can be used to free an object that was allocated with mi_malloc_small() or
/// any allocation with a size < MI_SMALL_SIZE_MAX()
/// @param p Pointer that was returned from #mi_malloc_small et al. Cannot be \a NULL !
/// @details
/// This function is meant for use in run-time systems for best
/// performance and does not check if the pointer was _indeed_ allocated
/// as a small object or not NULL -- use with care!
///
/// @see mi_free_small()
/// @see mi_malloc_small()
/// @see mi_zalloc_small()
/// @see mi_heap_malloc_small()
/// @see mi_heap_zalloc_small()
/// @see mi_theap_malloc_small()
/// @see mi_theap_zalloc_small()
void mi_free_small_nonnull(void* p);

/// \}


Expand Down Expand Up @@ -1406,9 +1443,6 @@ void* mi_theap_realloc(mi_theap_t* theap, void* p, size_t newsize);
///
/// \{

/// Checked `free`: just as `mi_free` but always checks if the pointer `p` belongs to our heap
/// and is safe to use when a pointer might be invalid or allocated by another allocator.
void mi_cfree(void* p);
void* mi__expand(void* p, size_t newsize);

size_t mi_malloc_size(const void* p);
Expand Down Expand Up @@ -1437,15 +1471,25 @@ int mi_reallocarr(void* p, size_t count, size_t size);
void* mi_aligned_recalloc(void* p, size_t newcount, size_t size, size_t alignment);
void* mi_aligned_offset_recalloc(void* p, size_t newcount, size_t size, size_t alignment, size_t offset);

/// @brief Free an object that was allocated with a known size.
/// @brief Free a block that was allocated with a known size.
/// @param p The pointer that was allocated with \a size bytes (or \a NULL )
/// @param size The size in bytes.
/// __v3__: this can improve performance for objects with a \size < MI_SMALL_SIZE_MAX()
/// __v3__: this can improve performance for objects with a \a size < MI_SMALL_SIZE_MAX()
/// as it will use mi_free_small() internally. Always use this if possible.
/// @see mi_free_tp()
/// @see mi_free_csize()
/// @see mi_free_size_nonnull()
void mi_free_size(void* p, size_t size);

/// @brief Free a non-NULL pointer that was allocated with a known size.
/// @param p The pointer that was allocated with \a size bytes (cannot be \a NULL !)
/// @param size The size in bytes.
/// __v3__: this can improve performance for objects with a \a size < MI_SMALL_SIZE_MAX()
/// as it will use mi_free_small_nonnull() internally. Always use this if possible.
/// @see mi_free_tp()
/// @see mi_free_csize()
void mi_free_size_nonnull(void* p, size_t size);

/// @brief Free an object that was allocated aligned.
/// @param p The pointer to the object (or \a NULL )
/// @param size The size of the object as allocated.
Expand Down
6 changes: 3 additions & 3 deletions doc/release-notes.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Binary and source releases for mimalloc.

- __v3__: recommended: latest mimalloc design that tends to use less memory then v2 but should perform similarly.
- __v2__: stable: most widely used.
- __v3__: recommended: latest mimalloc design that tends to use less memory then v2.
- __v2__: stable legacy.
- __v1__: legacy.

Notes:
Expand All @@ -10,6 +10,6 @@ Notes:
- Generally it is recommended to download sources (or use `vcpkg` etc.) and build mimalloc as
part of your project.
- Source releases can also be downloaded directly from github by the tag.
For example <https://github.com/microsoft/mimalloc/archive/v3.4.0.tar.gz>.
For example <https://github.com/microsoft/mimalloc/archive/v3.5.1.tar.gz>.
- Binary releases include a release-, debug-, and secure build.
- Linux binaries are built on Ubuntu 22.
2 changes: 1 addition & 1 deletion docs/annotated.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="mimalloc-logo.svg"/></td>
<td id="projectalign">
<div id="projectname">mi-malloc<span id="projectnumber">&#160;3.4/2.4/1.9</span>
<div id="projectname">mi-malloc<span id="projectnumber">&#160;3.5/2.5/1.15</span>
</div>
</td>
<td> <div id="MSearchBox" class="MSearchBoxInactive">
Expand Down
2 changes: 1 addition & 1 deletion docs/bench.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="mimalloc-logo.svg"/></td>
<td id="projectalign">
<div id="projectname">mi-malloc<span id="projectnumber">&#160;3.4/2.4/1.9</span>
<div id="projectname">mi-malloc<span id="projectnumber">&#160;3.5/2.5/1.15</span>
</div>
</td>
<td> <div id="MSearchBox" class="MSearchBoxInactive">
Expand Down
2 changes: 1 addition & 1 deletion docs/build.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="mimalloc-logo.svg"/></td>
<td id="projectalign">
<div id="projectname">mi-malloc<span id="projectnumber">&#160;3.4/2.4/1.9</span>
<div id="projectname">mi-malloc<span id="projectnumber">&#160;3.5/2.5/1.15</span>
</div>
</td>
<td> <div id="MSearchBox" class="MSearchBoxInactive">
Expand Down
2 changes: 1 addition & 1 deletion docs/classes.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="mimalloc-logo.svg"/></td>
<td id="projectalign">
<div id="projectname">mi-malloc<span id="projectnumber">&#160;3.4/2.4/1.9</span>
<div id="projectname">mi-malloc<span id="projectnumber">&#160;3.5/2.5/1.15</span>
</div>
</td>
<td> <div id="MSearchBox" class="MSearchBoxInactive">
Expand Down
5 changes: 4 additions & 1 deletion docs/doxygen_crawl.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
<a href="group__constantsize.html"/>
<a href="group__constantsize.html#ga105bd667da91a15d113fe79be04d625c"/>
<a href="group__constantsize.html#ga1addf755829380581dd9c3c9175e376f"/>
<a href="group__constantsize.html#ga38a93d373a9dc8edc8bca83edb6af5c5"/>
<a href="group__constantsize.html#ga7a421e302074e598527c3eb052a6a3c5"/>
<a href="group__constantsize.html#ga9cd44d925d34f7180922e12bbf594571"/>
<a href="group__constantsize.html#gadca6d340ee15b5c70695ed82d95c6cec"/>
Expand All @@ -113,6 +114,7 @@
<a href="group__extended.html"/>
<a href="group__extended.html#ga0ae4581e85453456a0d658b2b98bf7bf"/>
<a href="group__extended.html#ga1ea64283508718d9d645c38efc2f4305"/>
<a href="group__extended.html#ga22890f54e5be433837069c8e97fdf379"/>
<a href="group__extended.html#ga292a45f7dbc7cd23c5352ce1f0002816"/>
<a href="group__extended.html#ga2a8469764c38dcaf878f36e5f50e3610"/>
<a href="group__extended.html#ga3460a6ca91af97be4058f523d3cb8ece"/>
Expand Down Expand Up @@ -174,6 +176,7 @@
<a href="group__malloc.html#ga4dc3a4067037b151a64629fe8a332641"/>
<a href="group__malloc.html#ga61f46bade3db76ca24aaafedc40de7b6"/>
<a href="group__malloc.html#ga6686568014b54d1e6c7ac64a076e4f56"/>
<a href="group__malloc.html#ga705dc7a64bffacfeeb0141501a5c35d7"/>
<a href="group__malloc.html#ga8bddfb4a1270a0854bbcf44cb3980467"/>
<a href="group__malloc.html#ga94c3afcc086e85d75a57e9f76b9b71dd"/>
<a href="group__malloc.html#gac057927cd06c854b45fe7847e921bd47"/>
Expand Down Expand Up @@ -250,9 +253,9 @@
<a href="group__posix.html#ga644bebccdbb2821542dd8c7e7641f476"/>
<a href="group__posix.html#ga66bcfeb4faedbb42b796bc680821ef84"/>
<a href="group__posix.html#ga6ac6a6a8f3c96f1af24bb8d0439cbbd1"/>
<a href="group__posix.html#ga705dc7a64bffacfeeb0141501a5c35d7"/>
<a href="group__posix.html#ga726867f13fd29ca36064954c0285b1d8"/>
<a href="group__posix.html#ga72e9d7ffb5fe94d69bc722c8506e27bc"/>
<a href="group__posix.html#ga796602dae2a89797026f72e0c0240f32"/>
<a href="group__posix.html#ga7b82a44094fdec4d2084eb4288a979b0"/>
<a href="group__posix.html#ga7e1934d60a3e697950eeb48e042bfad5"/>
<a href="group__posix.html#ga9d23ac7885fed7413c11d8e0ffa31071"/>
Expand Down
2 changes: 1 addition & 1 deletion docs/environment.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="mimalloc-logo.svg"/></td>
<td id="projectalign">
<div id="projectname">mi-malloc<span id="projectnumber">&#160;3.4/2.4/1.9</span>
<div id="projectname">mi-malloc<span id="projectnumber">&#160;3.5/2.5/1.15</span>
</div>
</td>
<td> <div id="MSearchBox" class="MSearchBoxInactive">
Expand Down
2 changes: 1 addition & 1 deletion docs/functions.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="mimalloc-logo.svg"/></td>
<td id="projectalign">
<div id="projectname">mi-malloc<span id="projectnumber">&#160;3.4/2.4/1.9</span>
<div id="projectname">mi-malloc<span id="projectnumber">&#160;3.5/2.5/1.15</span>
</div>
</td>
<td> <div id="MSearchBox" class="MSearchBoxInactive">
Expand Down
2 changes: 1 addition & 1 deletion docs/functions_vars.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="mimalloc-logo.svg"/></td>
<td id="projectalign">
<div id="projectname">mi-malloc<span id="projectnumber">&#160;3.4/2.4/1.9</span>
<div id="projectname">mi-malloc<span id="projectnumber">&#160;3.5/2.5/1.15</span>
</div>
</td>
<td> <div id="MSearchBox" class="MSearchBoxInactive">
Expand Down
2 changes: 1 addition & 1 deletion docs/group__aligned.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="mimalloc-logo.svg"/></td>
<td id="projectalign">
<div id="projectname">mi-malloc<span id="projectnumber">&#160;3.4/2.4/1.9</span>
<div id="projectname">mi-malloc<span id="projectnumber">&#160;3.5/2.5/1.15</span>
</div>
</td>
<td> <div id="MSearchBox" class="MSearchBoxInactive">
Expand Down
2 changes: 1 addition & 1 deletion docs/group__analysis.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="mimalloc-logo.svg"/></td>
<td id="projectalign">
<div id="projectname">mi-malloc<span id="projectnumber">&#160;3.4/2.4/1.9</span>
<div id="projectname">mi-malloc<span id="projectnumber">&#160;3.5/2.5/1.15</span>
</div>
</td>
<td> <div id="MSearchBox" class="MSearchBoxInactive">
Expand Down
Loading
Loading