Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
334 commits
Select commit Hold shift + click to select a range
130b77a
fix wrong memcpy_aligned in aligned_at api, issue #1271 3.46
daanx Jul 31, 2026
8b7781a
fix aliased mi_malloc_size/mi_malloc_usable_size
daanx Jul 31, 2026
a066f73
merge from dev
daanx Jul 31, 2026
7ba2c98
dont stop theap visitor if the theap is empty, issue #1271 3.47
daanx Jul 31, 2026
cb28f2c
dont stop theap visitor if the heap is empty, issue #1271 3.47
daanx Jul 31, 2026
f50fe32
always call error_message on invalid alignments; always set errno on …
daanx Jul 31, 2026
aada87c
merge from dev
daanx Jul 31, 2026
7401ae9
fix test for 32-bit
daanx Jul 31, 2026
ced2b88
disable C++ new-handler test for now
daanx Jul 31, 2026
16a620f
Merge branch 'dev' into dev3
daanx Jul 31, 2026
98328ce
fix UB in mi_ctz_generic32, issue #1271 3.102
daanx Jul 31, 2026
97b9c05
fix return value of _mi_getenv on invalid parameters to ENOENT, issue…
daanx Jul 31, 2026
204c6cb
check strtol for errors, issue #1271 3.98
daanx Jul 31, 2026
66b9380
check for overlong environment values, issue #1271 3.98
daanx Jul 31, 2026
29c698e
revise mi_out_num to not truncate in reverse, issue #1271, 3.99
daanx Jul 31, 2026
d836fb3
fix %-x,%-p formats, issue #1271 3.100
daanx Jul 31, 2026
e8a8ca2
use static format strings, issue #1271 3.101
daanx Jul 31, 2026
43862e1
fix early break restore in _mi_bitmap_forall_setc_ranges, issue #1271…
daanx Jul 31, 2026
586a6ca
fix debug arena's with NULL slots, issue #1271 3.106
daanx Jul 31, 2026
33dd80f
fix debug array bound, issue #1271 3.107
daanx Jul 31, 2026
00f6c6b
fix assertion, issue #1271 3.109
daanx Jul 31, 2026
00699f4
better recovery on contended bit claim, issue #1271 3.111
daanx Jul 31, 2026
6bae591
remove unused atomic thread fence, issue #1271 3.119
daanx Jul 31, 2026
0b76d47
fix atomic MSVC signature, issue #1271 3.120
daanx Jul 31, 2026
33d90fb
fix ifdefs for mi_mul_overflow, issue #1271 3.121
daanx Jul 31, 2026
f4f65d3
Merge branch 'dev' into dev3
daanx Jul 31, 2026
ef3867f
guard against free list corruption in double-free check
daanx Jul 31, 2026
d9d8332
clean up double free checks
daanx Jul 31, 2026
8c49477
merge from dev
daanx Jul 31, 2026
856a68c
merge from dev
daanx Jul 31, 2026
838587c
increase randomness of nonce in chacha split, issue #1271 3.49
daanx Jul 31, 2026
d7cb7dd
Merge branch 'dev' into dev3
daanx Jul 31, 2026
e8aa6cc
clamp on-demand page commit to not extend into the guard page; limit …
daanx Jul 31, 2026
4756dcc
clamp debug free memset to DEBUG_FREED to 1MiB, issue #1271 3.52
daanx Jul 31, 2026
d077de5
merge from dev
daanx Jul 31, 2026
6d0c746
use atomic loads for stat_count_add_mt, issue #1271 3.65
daanx Jul 31, 2026
da6af48
fix wrong segment .CRT to .CRT for x86, issue #1271 3.69
daanx Jul 31, 2026
0b64242
make windows TLS slot indices atomic, issue #1271, 3.62 3.63
daanx Jul 31, 2026
9c79ca3
add missing linker include for _mi_crt_callback_init, issue #1271, 3.70
daanx Jul 31, 2026
490c664
check processinfo result on windows, issue #1271, 3.72
daanx Jul 31, 2026
c6ed555
ensure the windows large page size is always set, issue #1271, 3.73
daanx Jul 31, 2026
233a325
better error codes for enable_large_os_pages on windows, issue #1271,…
daanx Jul 31, 2026
7f67ac0
check all return values on windows, issue #1271, 3.75
daanx Jul 31, 2026
60c12d8
check for __BMI__ as __BMI1__, issues #1271, 3.103 3.104
daanx Jul 31, 2026
37f1f55
increase minimal arena slice to 8KiB, issues #1271, 3.103 3.105
daanx Jul 31, 2026
f563367
add C11 _Alignas fallback, issues #1271, 3.103 3.123
daanx Jul 31, 2026
cb2e35e
proper error codes for realpath on windows, issue #1271 3.124
daanx Jul 31, 2026
c83b233
zero chacha initial key on the stack after use, issue #1271 3.142
daanx Jul 31, 2026
78cc89d
backport recent windows primitive fixes in dev3
daanx Jul 31, 2026
c9c86c7
allow build for universal windows platform. PR #1340 by @thexia
daanx Jul 31, 2026
97689b8
use GetModuleHandle for ntdll, kernelbase, and kernel32 on windows
daanx Aug 1, 2026
dadf129
return large page size on windows
daanx Aug 1, 2026
5febbe5
merge from dev
daanx Aug 1, 2026
df1fdb4
backport improved windows realpath
daanx Aug 1, 2026
f2a55f4
fix warnings on msvc
daanx Aug 1, 2026
a26d62c
punctuation, PR #1334 by @Helder-Magalheas
daanx Aug 1, 2026
60c4f03
add mingw windows support (by @zackees, see <https://github.com/zacke…
daanx Aug 1, 2026
064deb1
Merge branch 'dev' into dev3
daanx Aug 1, 2026
230b721
Merge branch 'dev' of /Volumes/T9/dev/mimalloc into dev
daanx Aug 1, 2026
1c2661a
remove v1/v2 mingw fix
daanx Aug 1, 2026
d036770
merge from dev3
daanx Aug 1, 2026
caafb37
fix windows compilation
daanx Aug 1, 2026
f75e2f3
set theap->heap after full initialization
daanx Aug 1, 2026
b16b0e3
use 20 bits for the version for thread locals on 32-bit
daanx Aug 1, 2026
f5dec97
fix failure of GetStdHandle for error output on Windows, issue #1271 …
daanx Aug 1, 2026
ce579b6
fix type of SYS_getcpu, issues #1271 3.79
daanx Aug 1, 2026
bb92936
fix TSAN failure on mi_stat_free
daanx Aug 1, 2026
141df47
allow sparse nodes for numa_node_count on Linux, issue #1271 3.80
daanx Aug 1, 2026
1aa6f42
check rusage result value, issue #1271 3.81
daanx Aug 1, 2026
fb06476
limit numa nodes for huge pages to 63, issue #1271 3.82
daanx Aug 1, 2026
8f14cd2
add comment on using a monotonic clock on emscripten
daanx Aug 1, 2026
f366690
fix write to empty heap and add tests, improve issue #1271 3.6
daanx Aug 1, 2026
dad4363
merge from dev
daanx Aug 1, 2026
688922e
start huge OS page allocation in the 32TiB range, issue #1271 3.86
daanx Aug 1, 2026
d40aac1
add error condition for a fixed TLS model without having tls slot acc…
daanx Aug 1, 2026
5b2b1dd
fix detection of truncated json output, issue #1271 3.90
daanx Aug 1, 2026
f0e7c5e
fix over-decremented commit stats on windows, issue #1271 3.91
daanx Aug 1, 2026
a4ddce7
Merge branch 'dev' into dev3
daanx Aug 1, 2026
470e71b
guard against negative current/peak commit values, issue #1271 3.92
daanx Aug 1, 2026
a3876e1
fix overcount of touched pages on initially nonzero managed memory, i…
daanx Aug 1, 2026
f53da62
decrement page stats on page_init failure, issue #1271 3.94
daanx Aug 1, 2026
24a7b15
fix mi_heap_merge_to_main to use the heap subproc, issue #1271 3.96
daanx Aug 1, 2026
f26715a
limit arena_max_object_size, issue #1271 3.114
daanx Aug 1, 2026
25d6dcf
check overflow in claim_huge_pages, issue #1271 3.117
daanx Aug 1, 2026
6f5c8a7
comments
daanx Aug 1, 2026
7bb480c
Merge branch 'dev' into dev3
daanx Aug 1, 2026
3399964
comments
daanx Aug 1, 2026
53a4167
remove unused defs
daanx Aug 1, 2026
3bd90d4
Merge branch 'dev' into dev3
daanx Aug 1, 2026
6295435
remove unused definitions
daanx Aug 1, 2026
4553ced
change mi_decl_unused to mi_decl_maybe_unused
daanx Aug 1, 2026
1b62a78
merge from dev3
daanx Aug 1, 2026
bcee5a8
fix windows test
daanx Aug 1, 2026
d36b1ca
Merge branch 'dev3' into dev3-meta
daanx Aug 1, 2026
2687a69
add debug output to test api
daanx Aug 1, 2026
344ee9f
fix debug format
daanx Aug 1, 2026
1d993d3
use collect in test-api heap-os2
daanx Aug 1, 2026
9e6c0d9
update heap-os2
daanx Aug 1, 2026
b0ac42e
fix error path on page_init fail for singleton pages, issue #1271 3.127
daanx Aug 1, 2026
9bba203
try to fix test heap-os2
daanx Aug 1, 2026
1fb3456
use reserved for pages_full_size adjustment
daanx Aug 1, 2026
0e83035
update readme
daanx Aug 1, 2026
023fcc0
bump version to 1.9.14
daanx Aug 1, 2026
6c44fc9
bump version to 1.9.14
daanx Aug 1, 2026
f9a7412
bump version to 3.4.4
daanx Aug 1, 2026
245abf1
update readme
daanx Aug 1, 2026
d0733eb
Merge branch 'dev' into dev3
daanx Aug 1, 2026
9ce8170
update readme
daanx Aug 1, 2026
1f06f69
Merge branch 'dev' into dev3
daanx Aug 1, 2026
0da523a
Merge branch 'dev3-meta' into dev3
daanx Aug 2, 2026
4792e0d
add -DMI_OPT_FREE_SMALL to cmake options
daanx Aug 2, 2026
4b7c559
optimize mi_free_size to call mi_free_small for small sizes
daanx Aug 2, 2026
d07a375
add constant size malloc/free inline definitions
daanx Aug 2, 2026
1002357
add constant size malloc/free inline definitions
daanx Aug 2, 2026
de80266
fix: bootstrap the library in mi_heap_new and mi_subproc_new
zackees Aug 2, 2026
36e8fc3
improve concurrent heap_delete and thread termination
daanx Aug 2, 2026
b5fdee4
fix mingw detection: __GCC__ -> __GNUC__ (see also PR #1349)
daanx Aug 2, 2026
10c2c3b
Merge pull request #1351 from zackees/pr/bootstrap-dev3
daanx Aug 2, 2026
8d56157
typo
daanx Aug 2, 2026
4cca633
fix mingw detection: __GCC__ -> __GNUC__ (see also PR #1349)
daanx Aug 2, 2026
46fc774
shorten comment
daanx Aug 2, 2026
2a2b18f
merge from dev3
daanx Aug 2, 2026
c808493
fix assertion
daanx Aug 2, 2026
e1a4c7e
fix mi_free_csize declaration
daanx Aug 2, 2026
4d8548c
msvc build fixes
daanx Aug 2, 2026
11e6853
fix error condition in XMALLOC, PR #1353 by @mdionisio
daanx Aug 3, 2026
b7ee6b6
make build deterministic, issue #1355
daanx Aug 3, 2026
6724c03
use direct WriteFile or console output on Windows, issue #1354
daanx Aug 3, 2026
97e198c
ensure the full usable block size is zerod on reallocation, issue #763
daanx Aug 3, 2026
4d63eb7
merge from dev
daanx Aug 3, 2026
11d655a
ensure the full usable block size is zero'd on reallocation, issue #763
daanx Aug 3, 2026
066a218
merge from dev
daanx Aug 3, 2026
591e889
ensure the full usable block size is zero'd on reallocation, issue #763
daanx Aug 3, 2026
435015e
merge from dev
daanx Aug 3, 2026
9e27e1c
improve rezalloc and rezalloc aligned, issue #763
daanx Aug 3, 2026
933b967
merge from dev
daanx Aug 3, 2026
36f2efe
fix signature of mem_is_zero
daanx Aug 3, 2026
3b798c2
fix signature of mem_is_zero
daanx Aug 3, 2026
5acce4d
merge from dev
daanx Aug 3, 2026
5ed79fe
enable c++ tests
daanx Aug 3, 2026
8810b23
add AIX support, issue #764
daanx Aug 3, 2026
8fc216b
fix c++ handler test
daanx Aug 3, 2026
bbb118c
Merge branch 'dev' into dev3
daanx Aug 3, 2026
59378be
make page->used 32-bit (for better codegen on riscV); make slice_pcom…
daanx Aug 4, 2026
a085261
don't run c++ handler test on 32 bit windows
daanx Aug 4, 2026
1fb9075
Merge branch 'dev3' into dev3-meta
daanx Aug 4, 2026
3a436a1
change mi_page_t field order for better cache access
daanx Aug 4, 2026
b8b66c0
Merge branch 'dev3' into dev3-meta
daanx Aug 4, 2026
8bfcc4a
simplify TLS defines
daanx Aug 4, 2026
c2e79bf
disable C++ handler check on windows
daanx Aug 4, 2026
e1684d4
Merge branch 'dev3' into dev3-meta
daanx Aug 4, 2026
4fb7441
cast __builtin_thread_pointer
daanx Aug 4, 2026
7464d25
fix __builtin_threadpointer cast
daanx Aug 4, 2026
4d3d9a5
update test.yaml
daanx Aug 4, 2026
55f12a9
set usable parameter in guarded allocation
daanx Aug 4, 2026
e09b142
merge from dev
daanx Aug 4, 2026
86b4bb9
refine useable size in mi_heap_realloc_zero
daanx Aug 4, 2026
c13362f
merge from dev
daanx Aug 4, 2026
7413a8b
for realloc, use mi_usable_size if padding is enabled
daanx Aug 4, 2026
54e28b7
Merge branch 'dev' into dev3
daanx Aug 4, 2026
56fd32b
Merge branch 'dev3' into dev3-meta
daanx Aug 4, 2026
96ce796
run mi_guarded tests with a sample rate of 1; use on demand page comm…
daanx Aug 4, 2026
efc9106
extend tests with page commit on demand
daanx Aug 4, 2026
cd33ec7
merge from dev3
daanx Aug 4, 2026
65dd388
fix usable return value for guarded allocations
daanx Aug 4, 2026
0b65627
merge from dev
daanx Aug 4, 2026
10e79a7
Merge branch 'dev3' into dev3-meta
daanx Aug 4, 2026
6d545f7
fix heap_realloc with guarded pages
daanx Aug 4, 2026
5bf3c16
Merge branch 'dev' into dev3
daanx Aug 4, 2026
3e4084e
Merge branch 'dev3' into dev3-meta
daanx Aug 4, 2026
048c1d6
update test yaml
daanx Aug 4, 2026
dc74f40
update test yaml
daanx Aug 4, 2026
e134447
re-enable riscv64 tests
daanx Aug 4, 2026
c9b0b8d
return block_size from the umalloc api's (instead of usable)
daanx Aug 4, 2026
427df0b
improve umalloc and realloc efficiency
daanx Aug 4, 2026
dac2171
merge from dev (ppage instead pblock_size)
daanx Aug 4, 2026
af5c418
Merge branch 'dev3' into dev3-meta
daanx Aug 4, 2026
e721902
compile without errors on mingw with ucrt64
daanx Aug 4, 2026
0b52dc9
merge from dev (mingw64-ucrt64 compilation)
daanx Aug 4, 2026
32943b8
add minject step for dynamic redirect tests on mingw
daanx Aug 4, 2026
aae71bc
Merge branch 'dev' into dev3
daanx Aug 4, 2026
4cffe1d
use mimalloc-override in test-stress in the msvc IDE
daanx Aug 4, 2026
1cf8869
use __MINGW32__ to detect mingw (instead of __GNUC__) -- use default …
daanx Aug 4, 2026
e085876
add mingw UCRT64 detection (see also PR #1349)
daanx Aug 4, 2026
42805bf
merge from dev
daanx Aug 4, 2026
144aa8c
Merge branch 'dev3' into dev3-meta
daanx Aug 4, 2026
5a2f144
add mingw ucrt64 test
daanx Aug 4, 2026
1ce5c61
update mingw ucrt64
daanx Aug 4, 2026
2f85ac4
update mingw ucrt64
daanx Aug 4, 2026
5c15c1d
update mingw ucrt64
daanx Aug 4, 2026
b4cbf8b
update mingw ucrt64
daanx Aug 4, 2026
22c5a8a
update mingw ucrt64
daanx Aug 4, 2026
8395e4f
update mingw ucrt64
daanx Aug 4, 2026
5ffa3ef
update mingw ucrt64
daanx Aug 4, 2026
d15a8f4
update mingw ucrt64
daanx Aug 4, 2026
e68ba5a
fix msystem ucrt64 detection
daanx Aug 4, 2026
6614106
add msys2 mingw ucrt64 test
daanx Aug 4, 2026
eb01759
merge from dev
daanx Aug 4, 2026
3a9f06f
add initial cygwin support (MSYS)
daanx Aug 5, 2026
e86928b
merge from dev3 (cygwin)
daanx Aug 5, 2026
3b4c63b
build with cygwin
daanx Aug 5, 2026
8308d5d
improve realloc codegen
daanx Aug 5, 2026
9c041ce
merge from dev3
daanx Aug 5, 2026
d6c1135
bump version to v1.9.15
daanx Aug 5, 2026
daeb818
merge from dev, bump version to v3.4.5
daanx Aug 5, 2026
6c84ab6
update readme
daanx Aug 5, 2026
acf2fdd
Merge branch 'dev' into dev3
daanx Aug 5, 2026
e6d8e90
update readme
daanx Aug 5, 2026
44d996b
Merge branch 'dev3' into dev3-meta
daanx Aug 5, 2026
b226da4
bump version to v3.5.0
daanx Aug 5, 2026
8cfe734
add comment
daanx Aug 5, 2026
fc1e2ac
update readme
daanx Aug 5, 2026
9b8de29
Merge branch 'dev3-meta' into dev3
daanx Aug 5, 2026
a3aebea
use atomics to access the pthread keys
daanx Aug 5, 2026
999a9ac
update documentation
daanx Aug 5, 2026
68320bf
merge from dev
daanx Aug 5, 2026
6c85dbc
update documentation
daanx Aug 6, 2026
f45596a
Merge branch 'dev' into dev3
daanx Aug 6, 2026
da184bd
update doxygen
daanx Aug 6, 2026
7caa238
Merge branch 'dev' into dev3
daanx Aug 6, 2026
e4868fd
only purge arenas from
daanx Aug 6, 2026
3f55a55
improve code for the pagemap
daanx Aug 6, 2026
e80f5ff
fix assertion
daanx Aug 6, 2026
008d9d1
fix potential deadlock when expanding threadlocals in debug mode, iss…
daanx Aug 6, 2026
9acd218
fix spelling from WINGW to MINGW
daanx Aug 6, 2026
2ec83e3
merge from dev
daanx Aug 6, 2026
12f212f
fix MINGW_UCRT ifdef
daanx Aug 6, 2026
2c18c98
Merge branch 'dev' into dev3
daanx Aug 6, 2026
6f5bcfd
improve atomic bit find and clear (see also PR #1346)
daanx Aug 6, 2026
af45b7e
use optimistic bit clearing
daanx Aug 6, 2026
61c96d4
fix return value of mi_bchunk_try_find_and_clear8
daanx Aug 6, 2026
fcc5036
set did_temp_clear_bits for optimistic locking
daanx Aug 6, 2026
8f620ea
fix debug assertions for mi_free_small/size
daanx Aug 6, 2026
4e198c7
improve fast path for mimalloc_generic
daanx Aug 6, 2026
ce15ccd
fix c++ tests
daanx Aug 7, 2026
870ac85
fix numa node count detection on linux
daanx Aug 7, 2026
c8c2c5a
Merge branch 'dev' into dev3
daanx Aug 7, 2026
ff8e7de
improve malloc inlining
daanx Aug 7, 2026
9929820
add missing parens in avx512
daanx Aug 7, 2026
792ead1
comment out wrong assertion
daanx Aug 7, 2026
40c9e6f
always enable pages stat count
daanx Aug 8, 2026
2e36264
merge from dev
daanx Aug 8, 2026
67fe9d8
fix C mode compilation on x86 with msvc, issue #1361
daanx Aug 8, 2026
4899425
avoid unsigned negation to avoid compiler warnings
daanx Aug 8, 2026
d63979a
improved 2-level pagemap
daanx Aug 9, 2026
ab2d5bb
improved checked free
daanx Aug 9, 2026
6def7be
fix thread_locals_get
daanx Aug 9, 2026
27d1636
merge upstream/dev3 (261 commits, through 6def7be9)
Jarred-Sumner Aug 11, 2026
5f9dffa
alloc: the new-handler retry's try/catch is guarded like the throw ab…
Jarred-Sumner Aug 11, 2026
49182d5
mi_malloc_size / mi_malloc_usable_size are public API: define them wh…
Jarred-Sumner Aug 11, 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
4 changes: 2 additions & 2 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.3
RELEASE: Release v3.4.5
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true

name: Release
Expand All @@ -19,7 +19,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
branch: [v3.4.3] # [dev,dev2,dev3]
branch: [v3.4.5, v2.4.5, v1.9.15] # [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]

Expand Down
269 changes: 261 additions & 8 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
on:
workflow_dispatch: # allow running the workflow manually
workflow_dispatch: # allow running the workflow manually
push:
branches:
- 'dev*'
Expand All @@ -9,7 +9,7 @@ on:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true # Cancel any in-progress runs of this workflow when a new run is triggered on the same ref (branch or tag)

name: Test
jobs:
build:
Expand All @@ -21,8 +21,21 @@ jobs:
os: [windows-latest, macos-latest, ubuntu-latest, macos-14, macos-15-intel, ubuntu-22.04-arm, windows-11-arm]
exclude:
- os: macos-14
tests: extra

tests: extra
include:
- os: ubuntu-latest
tests: freebsd-x64
- os: ubuntu-latest
tests: alpine-x64
- os: ubuntu-latest
tests: alpine-riscv64 # qemu
- os: ubuntu-latest
tests: alpine-arm32 # qemu
- os: windows-latest
tests: mingw-ucrt64
# - os: ubuntu-latest # slow, so disable by default
# tests: freebsd-arm64 # qemu

steps:
# Checkout: https://github.com/actions/checkout
- name: Checkout repository
Expand All @@ -39,10 +52,18 @@ jobs:
- name: Release
if: matrix.tests == 'basic'
run: |
cmake . -B out/release -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON
cmake . -B out/release -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON -DMI_SEE_ASM=ON
cmake --build out/release --parallel 4 --config Release
ctest --test-dir out/release --verbose --timeout 240 -C Release

- name: Release, asm
if: matrix.tests == 'basic' && runner.os == 'Linux'
uses: actions/upload-artifact@v7
with:
name: ${{ matrix.os }}-alloc.c.s
path: out/release/CMakeFiles/mimalloc-static.dir/src/alloc.c.s


- name: Secure
if: matrix.tests == 'basic'
run: |
Expand All @@ -65,7 +86,7 @@ jobs:
cmake --build out/release-cxx --parallel 8 --config Release
ctest --test-dir out/release-cxx --verbose --timeout 240 -C Release

# Extra, Windows x86
# Extra, Windows x86
- name: Debug, Win32
if: matrix.tests == 'extra' && runner.os == 'Windows' && !endsWith(matrix.os,'arm')
run: |
Expand All @@ -92,7 +113,7 @@ jobs:
run: |
cmake . -B out/release-clang -DCMAKE_BUILD_TYPE=Release -A Win32 -T ClangCl
cmake --build out/release-clang --parallel 4 --config Release
ctest --test-dir out/release-clang --verbose --timeout 240 -C Release
ctest --test-dir out/release-clang --verbose --timeout 240 -C Release

# Extra, macOS fixed TLS
- name: Debug, TLS fixed
Expand Down Expand Up @@ -149,10 +170,17 @@ jobs:
- name: Release, C++, clang++
if: matrix.tests == 'extra' && runner.os == 'Linux'
run: |
CC=clang CXX=clang++ cmake . -B out/release-clang-cxx -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON -DMI_USE_CXX=ON
CC=clang CXX=clang++ cmake . -B out/release-clang-cxx -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON -DMI_USE_CXX=ON -DMI_SEE_ASM=ON
cmake --build out/release-clang-cxx --parallel 8 --config Release
ctest --test-dir out/release-clang-cxx --verbose --timeout 240 -C Release

- name: Release, C++, clang++, asm
if: matrix.tests == 'extra' && runner.os == 'Linux'
uses: actions/upload-artifact@v7
with:
name: ${{ matrix.os }}-clang-cxx-alloc.s
path: out/release-clang-cxx/alloc.s

- name: Debug, ASAN
if: matrix.tests == 'extra' && runner.os == 'Linux'
run: |
Expand Down Expand Up @@ -191,3 +219,228 @@ jobs:
ctest --test-dir out/release-guarded --verbose --timeout 240 -C Release
env:
MIMALLOC_GUARDED_SAMPLE_RATE: 100

# MSYS2 mingw64
- name: mingw-ucrt64 x64, Setup
if: matrix.tests == 'mingw-ucrt64'
uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
install: |
mingw-w64-ucrt-x86_64-gcc
mingw-w64-ucrt-x86_64-git
mingw-w64-ucrt-x86_64-make
mingw-w64-ucrt-x86_64-cmake

- name: mingw-ucrt64 x64, Debug
if: matrix.tests == 'mingw-ucrt64'
shell: msys2 {0}
run: |
env
cmake . -B out/debug-mingw-ucrt64-x64 -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON
cmake --build out/debug-mingw-ucrt64-x64 --parallel 4 --config Debug
ctest --test-dir out/debug-mingw-ucrt64-x64 --verbose --timeout 240 -C Debug

- name: mingw-ucrt64 x64, Release
if: matrix.tests == 'mingw-ucrt64'
shell: msys2 {0}
run: |
cmake . -B out/release-mingw-ucrt64-x64 -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON
cmake --build out/release-mingw-ucrt64-x64 --parallel 4 --config Release
ctest --test-dir out/release-mingw-ucrt64-x64 --verbose --timeout 240 -C Release


# VM: FreeBSD (arm64 and x64)
- name: FreeBSD arm64, Setup
if: matrix.tests == 'freebsd-arm64'
uses: vmactions/freebsd-vm@v1
with:
arch: arm64
custom-shell-name: freebsd-arm64
cache-after-prepare: true
prepare: |
uname -a
pkg install -y cmake

- name: FreeBSD arm64, Debug
if: matrix.tests == 'freebsd-arm64'
shell: freebsd-arm64 {0}
run: |
export MI_TEST_LIGHT=1
cmake . -B out/debug-arm64 -G Ninja -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON
cmake --build out/debug-arm64 --parallel 4 --config Debug
ctest --test-dir out/debug-arm64 --verbose --timeout 240 -C Debug

- name: FreeBSD arm64, Release
if: matrix.tests == 'freebsd-arm64'
shell: freebsd-arm64 {0}
run: |
export MI_TEST_LIGHT=1
cmake . -B out/release-arm64 -G Ninja -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON
cmake --build out/release-arm64 --parallel 4 --config Release
ctest --test-dir out/release-arm64 --verbose --timeout 240 -C Release

- name: FreeBSD arm64, Secure
if: matrix.tests == 'freebsd-arm64'
shell: freebsd-arm64 {0}
run: |
export MI_TEST_LIGHT=1
cmake . -B out/secure-arm64 -G Ninja -DCMAKE_BUILD_TYPE=Release -DMI_SECURE=ON
cmake --build out/secure-arm64 --parallel 4 --config Release
ctest --test-dir out/secure-arm64 --verbose --timeout 240 -C Release


- name: FreeBSD x64, Setup
if: matrix.tests == 'freebsd-x64'
uses: vmactions/freebsd-vm@v1
with:
arch: x86_64
usesh: true
custom-shell-name: freebsd-x64
cache-after-prepare: true
prepare: |
pkg install -y cmake

- name: FreeBSD x64, Debug
if: matrix.tests == 'freebsd-x64'
shell: freebsd-x64 {0}
run: |
cmake . -B out/debug-x64 -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON
cmake --build out/debug-x64 --parallel 4 --config Debug
ctest --test-dir out/debug-x64 --verbose --timeout 240 -C Debug

- name: FreeBSD x64, Release
if: matrix.tests == 'freebsd-x64'
shell: freebsd-x64 {0}
run: |
cmake . -B out/release-x64 -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON
cmake --build out/release-x64 --parallel 4 --config Release
ctest --test-dir out/release-x64 --verbose --timeout 240 -C Release

- name: FreeBSD x64, Secure
if: matrix.tests == 'freebsd-x64'
shell: freebsd-x64 {0}
run: |
cmake . -B out/secure-x64 -DCMAKE_BUILD_TYPE=Release -DMI_SECURE=ON
cmake --build out/secure-x64 --parallel 4 --config Release
ctest --test-dir out/secure-x64 --verbose --timeout 240 -C Release


# VM: Alpine Linux with MUSL libc (riscv64 and x64)
- name: Alpine riscv64, Setup
if: matrix.tests == 'alpine-riscv64'
uses: jirutka/setup-alpine@v1
with:
arch: riscv64
shell-name: alpine-riscv64.sh
packages: |
build-base
cmake
ninja

- name: Alpine riscv64, Debug
if: matrix.tests == 'alpine-riscv64'
shell: alpine-riscv64.sh {0}
env:
MI_TEST_LIGHT: 1
run: |
uname -m
cmake . -B out/debug-riscv64 -G Ninja -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON
cmake --build out/debug-riscv64 --parallel 4 --config Debug
ctest --test-dir out/debug-riscv64 --verbose --timeout 240 -C Debug

- name: Alpine riscv64, Release
if: matrix.tests == 'alpine-riscv64'
shell: alpine-riscv64.sh {0}
run: |
cmake . -B out/release-riscv64 -G Ninja -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON -DMI_SEE_ASM=ON
cmake --build out/release-riscv64 --parallel 4 --config Release
ctest --test-dir out/release-riscv64 --verbose --timeout 240 -C Release

- name: Alpine risc64, asm
if: matrix.tests == 'alpine-riscv64'
uses: actions/upload-artifact@v7
with:
name: alpine-riscv64-alloc.c.s
path: out/release-riscv64/CMakeFiles/mimalloc.dir/src/alloc.c.s

- name: Alpine riscv64, Secure
if: matrix.tests == 'alpine-riscv64'
shell: alpine-riscv64.sh {0}
run: |
cmake . -B out/secure-riscv64 -G Ninja -DCMAKE_BUILD_TYPE=Release -DMI_SECURE=ON
cmake --build out/secure-riscv64 --parallel 4 --config Release
ctest --test-dir out/secure-riscv64 --verbose --timeout 240 -C Release


- name: Alpine x64, Setup
if: matrix.tests == 'alpine-x64'
uses: jirutka/setup-alpine@v1
with:
arch: x86_64
shell-name: alpine-x64.sh
packages: |
build-base
cmake

- name: Alpine x64, Debug
if: matrix.tests == 'alpine-x64'
shell: alpine-x64.sh {0}
run: |
cmake . -B out/debug-x64 -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON
cmake --build out/debug-x64 --parallel 4 --config Debug
ctest --test-dir out/debug-x64 --verbose --timeout 240 -C Debug

- name: Alpine x64, Release
if: matrix.tests == 'alpine-x64'
shell: alpine-x64.sh {0}
run: |
cmake . -B out/release-x64 -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON
cmake --build out/release-x64 --parallel 4 --config Release
ctest --test-dir out/release-x64 --verbose --timeout 240 -C Release

- name: Alpine x64, Secure
if: matrix.tests == 'alpine-x64'
shell: alpine-x64.sh {0}
run: |
cmake . -B out/secure-x64 -DCMAKE_BUILD_TYPE=Release -DMI_SECURE=ON
cmake --build out/secure-x64 --parallel 4 --config Release
ctest --test-dir out/secure-x64 --verbose --timeout 240 -C Release

- name: Alpine arm32, Setup
if: matrix.tests == 'alpine-arm32'
uses: jirutka/setup-alpine@v1
with:
arch: armv7 # or armhf for arm-v6 with hard float
shell-name: alpine-arm32.sh
packages: |
build-base
cmake

- name: Alpine arm32, Debug
if: matrix.tests == 'alpine-arm32'
shell: alpine-arm32.sh {0}
env:
MI_TEST_LIGHT: 1
run: |
uname -m
cmake . -B out/debug-arm32 -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON
cmake --build out/debug-arm32 --parallel 4 --config Debug
ctest --test-dir out/debug-arm32 --verbose --timeout 240 -C Debug

- name: Alpine arm32, Release
if: matrix.tests == 'alpine-arm32'
shell: alpine-arm32.sh {0}
run: |
cmake . -B out/release-arm32 -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON
cmake --build out/release-arm32 --parallel 4 --config Release
ctest --test-dir out/release-arm32 --verbose --timeout 240 -C Release

- name: Alpine arm32, Secure
if: matrix.tests == 'alpine-arm32'
shell: alpine-arm32.sh {0}
run: |
cmake . -B out/secure-arm32 -DCMAKE_BUILD_TYPE=Release -DMI_SECURE=ON
cmake --build out/secure-arm32 --parallel 4 --config Release
ctest --test-dir out/secure-arm32 --verbose --timeout 240 -C Release

Loading