Skip to content

Conversation

@ayappanec
Copy link
Contributor

@ayappanec ayappanec commented Nov 1, 2023

This PR is to fix the problem mentioned in the issue #111544

@erlend-aasland
Copy link
Contributor

ISTM this change can be upstreamed. What do you think?

@vstinner
Copy link
Member

vstinner commented Nov 1, 2023

It LGTM, but can you please remove the Changlog (NEWS) entry? It's not useful for the next Python release.

@vstinner
Copy link
Member

vstinner commented Nov 1, 2023

cc @DinoV

@ayappanec
Copy link
Contributor Author

It LGTM, but can you please remove the Changlog (NEWS) entry? It's not useful for the next Python release.

I just removed the NEWS entry.

@vstinner vstinner merged commit 794dff2 into python:main Nov 2, 2023
@vstinner
Copy link
Member

vstinner commented Nov 2, 2023

Merged, thanks.

@ayappanec
Copy link
Contributor Author

Merged, thanks.

Thank you very much for the support.

FullteaR pushed a commit to FullteaR/cpython that referenced this pull request Nov 3, 2023
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
daanx added a commit to microsoft/mimalloc that referenced this pull request May 18, 2024
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
kwvg added a commit to kwvg/bls-signatures that referenced this pull request Oct 27, 2025
7a2a41134 bump version to 3.0.10
d9f09dde9 add MI_DEBUG_ASSERT option to cmake
3b2d47930 remove the temporary fix to always unalign pointers on free
24164aedd fix potential race condition with setting the alignment flag and changing the threadid of a page
3e0449177 bump version to 3.0.9
7a5d3050e temporary fix: always unalign pointers passed to mi_free to handle potential interior pointers correctly
a479aaba9 cherry pick guarded sample rate fix
8c9f39fde bump version to 3.0.7
0f7c9d33e set build setting MI_OPT_ARCH by default to OFF to ensure it runs as x64 under the arm64 emulator; performance impact is minimal on x64 and unchanged for native arm64
6be28eda6 bump version to 3.0.6
0f2cc2557 fix decl_nodiscard annotation for Linux builds
796aa40b3 fix decl_nodiscard annotation for Linux builds
dcd6fd77b ensure the page submaps are zero initialized
a18b69226 check commit success for pagemap extension so NULL can be returned instead of faulting (issue #1098)
ac4e3fd17 bump version to v3.0.5
f5ce881fd fix state of commit bits on commit failure
088e32e4e add mi_bitmap_popcountN
b95268d46 only adjust commit stats on success
8b2f77465 auto run azure pipeline
25fdd5066 return NULL in mi_arena_try_alloc_at if we cannot commit but commit was requested
bea8a12d3 fix error path on commit failure to use correct base address
6454abb02 disable azure pipeline for windows 2019 as it is deprecated
4022df808 fix build error on Ubuntu
86757dfbd improve precision of malloc_huge statistic by always using the global os stats
2157947ec fix warning on Ubuntu 22
9232c5c8a check all _mi_os_commit calls and return NULL if failing to commit
5c0effd42 fix missing csize assignment in _mi_os_free_ex
2c839e709 fix statistics for tracking the freed size of huge pages
3b567b105 ensure page stats are done on the subproc stats in case the tld is NULL
3301ba09b fix page_bin and pages statistics; merge thread-local statistics regularly with main statistics; bump version to 3.0.4
15b2d1cbd bump version to 3.0.3
a9992591d count page_bin statistics
c023ba3d1 fix install of mimalloc-stats.h
b1bb34a77 fix compilation for guarded build
72b1b76e4 add acces to statistics for runtime performance counters
385c8be25 Merge branch 'dev3' into dev3-bin
54d5a6300 Merge branch 'dev' into dev3
b357b80df update mimalloc-redirect to v1.3.2
3c4d53e64 Merge branch 'dev' into dev3
8b49a9f49 remove deprecated ubuntu 20 from pipeline
aa0f6978d Merge branch 'dev3' into dev3-bin
2775be9be disable page commit_on_demand by default
cd2763aa3 fix compile warnings and assertion
0cbdcfac9 fix signed warning
6444cbc42 Merge branch 'dev3' into dev3-bin
96c8e5c92 Merge branch 'dev3-bin' of /Volumes/T9/dev/mimalloc into dev3-bin
d9439a7e3 merge from dev
ece1defe5 parameter of clz/ctz is size_t
c62d27683 optimize mi_bin
44a4c83fb maintain count in pagequeue for constant time test in free.c
e81ddcb78 Merge branch 'dev3' into dev3-bin
63b8f8f75 fix assertion condition
69a5fbb1f avoid overflow in max address calculation on 32-bit (issue #1010)
f905c14f0 Merge branch 'dev' into dev3
d3897635a fix compilation warning
02b97b689 merge from dev
0c8069ada use physical memory in kib to avoid overflow of size_t (issue #1010)
ec4aa62b6 use physical memory in kib to avoid overflow of size_t (issue #1010)
42fc328ea Merge branch 'dev3' into dev3-bin
c820259f3 fix heap_main declaration
875536930 Merge branch 'dev' into dev3
78dd3f0e3 add mi_is_redirected back (issue #993)
e92358ba4 merge from dev; add _mi_heap_main_get (issue #1010)
1d3d19356 make heap_main mi_decl_hidden
a7a0db06d merge from dev
156687ac8 rename to mi_thread_set_in_threadpool
aae2e0b2f merge from dev
08ebe070a add mi_heap_set_in_threadpool
1d78531a6 update minject to take target arch into account (issue #997)
89d629317 limit page_reclaim to page queues of less than 4 pages; make page_commit_on_demand 0 by default.
9f1c0054b Merge branch 'dev3' into dev3-bin
02311cb12 Merge branch 'dev' into dev3
3e7875066 add dynamic override test on windows
a1cb38b70 fix link error in debug mode in test
8a036ee2b Merge branch 'dev' into dev3
84aadcb08 avoid link error with asan/c++
11f4da7ea add simd test on windows
a78321b31 Merge branch 'dev3' into dev3-bin
54cf68b67 Merge branch 'dev' into dev3
62833be9e disable dynamic override test on ubsan/tsan/asan
667df6e0d Merge branch 'dev3' into dev3-bin
f3c86bd97 add simd test in azure pipeline
6bdf5a7a4 merge from dev
7dd598e0e add dynamic override test
35e81c1a3 Merge branch 'dev3' into dev3-bin
d8c119cc4 add mi_decl_maybe_unused; fix compilation with OPT_SIMD (issue #1009)
fe5258a17 change process initialization order (potential fix for issue #1007)
06ade47b0 fix is_huge definition
1f433881c Merge branch 'dev3-bin'
8d9b6b2b9 merge from dev3
9dd753d2c add comment
4d1b0f0db Merge branch 'dev' into dev3
5f9b42685 remove declspec(dllexport) from DllMain on Windows (issue #1008)
c7f7c23dc make C compatible
1500d73e9 Merge branch 'dev3' of https://github.com/microsoft/mimalloc into dev3
53917d45a merge from dev
069279e3e improve cmake for multi-arch binaries on apple
4e366c432  support mixed architecture binaries on apple
0e9159e0b add comment
6d350ab85 set the option commit_on_demand back to 2 as we only do this for medium/large pages
cb2719cdb Merge pull request #999 from jbatez/dev
152804bb9 Merge pull request #1006 from sergio-nsk/sergio-nsk/uwp/1
2048fa2d1 fix comments
2017181a6 improve performance of clearNX
bc7fe059a improve performance of mi_free_collect_mt by specializing mi_page_unown
9b7914fd3 fix bug in mi_page_free_collect_partly where the tail of the free list was kept
ca25fb3d1 avoid reload on clearing mask
9053cf0cd prim: fix dev3 UWP build (#1005)
793167889 further optimize  mi_bchunk_try_find_and_clearNX
1ee72dc6d Merge branch 'dev3' into dev3-bin
64aaf9d88 fix performance bug in mi_bchunk_try_find _and_clearNX
63e625d9f Merge branch 'dev3' into dev3-bin
4c562f392 allow page reclaim on free to the originating heap also within a threadpool
3d767ebef use regular free in zone_free on macos
515047b67 improve free on macos
f13f8b3e0 Merge branch 'dev3' into dev3-bin
1657bfb45 clarify control flow and comments in page reclaim_on_free
dddf732c6 merge from dev3
5aa679cde make page_reclaim_on_free 0 by default; but allow reclaim_on_free if the page was originally in this heap (just as in v2 with the full queue)
5fbba3f20 fix sign of comparison
27895ce35 fix guard page size calculation in secure mode
1e0801dce call page_free_collect less often from a page search
3443dd01d Merge branch 'dev3-bin' of /Volumes/T9/dev/mimalloc into dev3-bin
348a2b12f Merge branch 'dev3' into dev3-bin
df172843d call page_free_collect less often from a page search
54c90fcac Merge branch 'dev3' into dev3-bin
8fc8da5d8 use thread local stats for abandoned statistics to reduce contention
b0c8d86c4 refactor mi_free_try_collect_mt
db7930f96 avoid atomics in mi_free_try_collect_mt
59eeeadc3 only allow page_reclaim_on_free for small block pages
eb0081382 support MI_OPT_ARCH when targeting multiple CMAKE_OSX_ARCHITECTURES
3d60be4ab Merge branch 'dev3' into dev3-bin
11f0c9d20 Merge branch 'dev3' of /Volumes/T9/dev/mimalloc into dev3
d55fde118 change defaults in test-stress
d48026cd9 Merge branch 'dev3' into dev3-bin
274bcb61d update option names
cec7b45f2 merge from dev3
dd4b6fc07 update options
b7665feb2 Merge branch 'dev3-bin' of https://github.com/microsoft/mimalloc into dev3-bin
7fcdb25af Merge branch 'dev3' of https://github.com/microsoft/mimalloc into dev3
0dd724997 Merge branch 'dev3' into dev3-bin
3a4ef0096 Merge branch 'dev' into dev3
6f42cc3fa Merge branch 'dev3' into dev3-bin
b783708d3 Merge branch 'dev3' of https://github.com/microsoft/mimalloc into dev3
90b7a694e syntax error fix (#992)
a7370dcbd fix highest allocated page for arena unload
5e71dfc33 check dynamically for getPhysicallyInstalledSystemMemory on windows (issue #992)
7703d14e8 redefine abandoned mapped as a special thread id
1fcf0678c Merge branch 'dev3' into dev3-bin
5946e9ceb fix assert
570b6b5a7 slightly better bsf
92f182bf4 Merge branch 'dev3' into dev3-bin
3f6d286a0 fix bug in page flag set that would keep pages abandoned
6137ae4ab fix page_flags
04ec6cd0b Merge branch 'dev3' into dev3-bin
899fd7694 fix unused function warnings; unregister pages
7b8a71077 windows on arm threadpool detect
3f9a5e15f Merge branch 'dev3' into dev3-bin
efbd3e5de Merge branch 'dev' into dev3
14b4f674f nicer figure
1568cb43f Merge branch 'dev' into dev3
2bc52557c add figure to readme for mimalloc-redirect
c2359e384 Merge branch 'dev3' into dev3-bin
d609435fd Merge branch 'dev' into dev3
4a14c6955 disable using vcpkg in the VS projects
5af1eb114 fix NULL pointer in _mi_safe_ptr_page to return a reference to the empty page
be2cb44de fix NULL pointer in _mi_safe_ptr_page to return a reference to the empty page
bc10fe27c fix unregister from the page-map
3c272a5b1 Merge branch 'dev3' into dev3-bin
e4befd1ce vcpkg: bump sha
6a89f8554 Merge branch 'dev' into dev3
97c304dc3 vcpkg: bump sha
866ce5b89 vcpkg: remove INTERFACE_INCLUDE_DIRECTORIES again
4dc353741 Merge branch 'dev3' into dev3-bin
050c5f2bb Merge branch 'dev' into dev3
bd8cdc912 add INTERFACE_INCLUDE_DIRECTORIES to vckpcg wrapper
c9d623a2e add INTERFACE_INCLUDE_DIRECTORIES to vckpcg wrapper
ae48fde3e Merge branch 'dev' into dev3
af602df75 update readme to reflect name changes of the Windows export library to mimalloc.dll.lib
5cd83e7de Merge branch 'dev' into dev3
7a2700148 update minject to use mimalloc.dll by default (issue #989)
d9065115c fix netBSD compilation (issue #988)
250fcdac2 Merge branch 'dev' into dev3
8d520306b set pdb name on windows
24ec5978c use .dll.pdb for the dll debug file in Visual Studio
13029958c Merge branch 'dev3' into dev3-bin
3fd47e754 merge from dev
f4c3a9069 update minject -- possible fix for #986
11e64c5c4 update vcpkg instructions
be05b232e fix obj path on windows
4e5a6d213 initial sources for vcpkg support
3f91c9f93 move docker files
0be6db0e2 comments
4fcf56af2 use consistent naming on Windows vs other platforms. Use mimalloc.dll.lib for the dll import library to avoid a clash with the static mimalloc.lib library
600ca88e8 fix library name for pkg config files (and to avoid extra patches in vcpkg)
432af2f30 use directly CMAKE_INSTALL_BIN/LIBDIR to avoid patch in vcpkg
0caf80ec3 default purge delay to 100ms
8788ffb14 Merge branch 'dev3' into dev3-bin
57eee51f4 rename full_page_retain to page_full_retain for consistency with the option
061ef80de clarify allow_destroy
7fa3b41fc limit object size in pages to 1/8th
195249e6b maintain precise try count for reclaim
c4f96f7ab update proj
16574468d merge from dev3
dd4b4a36b use standard heap_collect every 10k generic allocations, disable reclaim_on_free by default
ab7fcbf39 Merge branch 'dev3' into dev3-bin
b2cdf81e8 comment
86550d09b set more conservative options with increased medium and small object sizes
a3b813c2b update readme with clang-cl cmake instructions
3f8d2d07a Merge branch 'dev3' into dev3-bin
fb9c395c3 Merge branch 'dev3-bin' of https://github.com/microsoft/mimalloc into dev3-bin
d7c273e5c merge from dev
1711a8275 add test for mimalloc override on Windows (issue #981)
5764845c4 fix build on msvc in C compilation; fix build with clang-cl on Windows
1b5399c96 set default purge delay to 0
240ff7532 merge from dev
8210c9aa0 bump version for further development
9ec5da08b bump version for further development
83fd6e33f Merge branch 'dev' of e:\dev\mimalloc3 into dev
86952f6d1 Merge branch 'dev3' into dev3-bin
a70bd2147 merge from dev
aa8e8ab58 remove mi_debug_show_arenas parameter
bd3392466 remove mi_debug_show_arenas parameter
bbe81101d add comment
a9324a2f2 merge from dev3
18244cebc refine MI_ENABLE_LARGE_PAGES
c518312fb allow narrow arena debug output
fab6bee76 nicer arena debug output
d3d551ab9 merge from dev
de0324e1a return length from _mi_snprintf
18bc6d905 Merge branch 'dev' into dev3
a41594060 move singleton pages to the full queue at allocation time
ffdea6367 update readme
e14cfd257 Merge branch 'dev' into dev3
69ea6a3c5 display full version during cmake
f8c6acdf7 Merge branch 'dev' into dev3
2451b5685 fix large OS page behaviour on Linux; default is now 2 which only uses large OS pages (not huge) through madvise
54cedbd7f merge from dev
27687718b bump version to 1.8.9 for further development
46ae913f2 bump version to 3.0.1 for further development
8bc0f43f9 fix link in readme
e394e340e Merge branch 'dev' into dev3
30dd2b9be allow large OS pages on Linux by default (but not on Android)
e14c8fc79 bump version to 3.0.0
07bf4eea2 merge from dev
98699c983 update to v1.8.8
c95d9865a merge from dev3-bin
03d816d7b Merge branch 'dev3' into dev3-bin
6099f76c8 nicer logic in free
b432f77bf Merge branch 'dev3' into dev3-bin
f6c2550ea fix enable large pages
b6adbbca0 combine flags and xthread_id
3c43225c1 fix initialization warning on gcc
281a51364 fix initialization warning on gcc
bbd7a492f fix signedness warning
7e539cc35 Merge branch 'dev3' into dev3-bin
2a75500ac disable large pages by default
4e43ebb49 Merge branch 'dev' into dev3
a0a6ad3cf add thread_local for c++
53873df61 Merge branch 'dev3' into dev3-bin
211f11218 merge from dev
e8c27072a fix alignment for mi_manage_os_memory (issue #980)
9363900f7 Merge branch 'dev3-bin' of e:\dev\mimalloc3 into dev3-bin
ab78d57a8 search size bins from small to large
d25f714ff merge from dev3
d242e86e7 Merge branch 'dev' into dev3
b28e2bdd9 fix pointer alignment for zero-sized large alignment case
34e402e12 fix NX test in try_find_and_clearN
10b40f90f fix scan of NX
44264b3d8 Merge branch 'dev3-bin' of e:\dev\mimalloc3 into dev3-bin
670ebd034 merge from dev3; make medium bin larger than other
5e26ba6fe fix debug output
3933ac9a3 merge from dev3
c507ee3d9 make bitmap scan cross bfields for NX; disable the use of large object pages
ff52ea055 Merge branch 'dev3' into dev3-bin
0d302cd17 add comments
84f2038a2 Merge branch 'dev3' into dev3-bin
9665d604d merge from dev
81d69d525 add newline
b5251a748 Merge pull request #905 from fd00/cygwin
b5ef80231 Merge pull request #909 from kdrag0n/patch-1
e9eb1c8cf Merge pull request #911 from QuarticCat/dev
f33aa58d8 Merge branch 'dev' into dev
e05aae944 Merge pull request #917 from rui314/missing-include
cf8277f4e Merge pull request #918 from mneumann/dev-fix-build-on-dragonflybsd
1accf3f88 Merge pull request #926 from eltociear/patch-1
d0f188194 Merge pull request #934 from doctorlai-msrc/fixtypo
02efc57c7 Merge branch 'dev' of https://github.com/microsoft/mimalloc into dev
2d94df860 fix potentially warning on gcc (pr #935)
aa6f203ec Merge pull request #967 from jorisgeer/update_readme_valgrind
9f70ce5fc avoid accessing heap->tld after running thread_done (pr #974)
e183384ad update vs project filter
d29372fda remove older vs projects as they became stale
485b69976 add filters for vs projects
9561ae428 rename segment_map_destroy to segment_map_unsafe_destroy
a046b6ff3 Merge pull request #975 from jblazquez/free-segment-map
7bd1d72bf Update readme.md to fix links (issue #978)
9511d0952 add neon version for chunk all_set
dddcd5de1 add neon version for chunk_is_clear
82a8b2445 Merge branch 'dev3' into dev3-bin
8a4c26377 add neon code for bit clear
c9ab24899 Merge branch 'dev3' into dev3-bin
e6d9011b9 Merge branch 'dev' into dev3
095abc9e3 fix TLS slot on macOS
e359e9b12 merge from dev3
fb704834c Merge branch 'dev3' into dev3-bin
0a7fd7eb6 use fixed tls on windows with static linking
807b5cd34 Merge branch 'dev3' into dev3-bin
8b6eb4752 merge from dev, add decl_hidden for better codegen on page_map loading
e10d0d2de add declspec hidden to improve codegen on arm64
f72ac7a5a add attr_noexept for better codegen on msvc
4c5bc125a Merge branch 'dev3' into dev3-bin
b70fd1093 merge from dev
783dcb412 add comments about TLS
2aad74e0c Merge branch 'dev3' into dev3-bin
bec06cfb9 merge from dev
47b5f48b2 renamed vcxproj
27e0c467a fix c++ initializer warning
76d50d456 Merge branch 'dev3' into dev3-bin
efe10513e fix initializer warning on clang-18
b48ffaf23 Merge branch 'dev' of d:\dev\mimalloc3 into dev
a245135d8 Merge branch 'dev3' into dev3-bin
5f13941c1 fix constructor re-initialization on subproc_main
63f47569f fix debug_show_arenas parameters
c65d5b878 Merge branch 'dev3' into dev3-bin
7ae726bb3 small fixes
b5c4a3c6e merge from dev3
8339cefde fix stats for delay purge commit
587e08ccd improve commit stats
cfe73e9d4 wip: merging from upstream
15061be4b commit page-map within one allocation
ce7eb4db7 fix page commit-on-demand setting
5a663da9a fix build warning
e64d6fcc4 Merge branch 'dev3' into dev3-bin
24b8384f8 remove is_expandable requirement on page candidates
a65742fdf merge from dev3
8259c0eb7 nice colors for heap maps
095f848ae fix issue #976
50d22cf09 Merge branch 'dev3' into dev3-bin
4d1d3471c rename page options
fe8e52cbc Merge branch 'dev3' into dev3-bin
1e1a12bf3 fix rounding issue with huge size allocations
6f6190c8a Merge branch 'dev3' into dev3-bin
d862e5795 fix huge page allocation size
e07887982 Merge branch 'dev3' into dev3-bin
ad6f48f3e fix assertion for huge pages
431370df6 Merge branch 'dev3' into dev3-bin
016b36d91 fix max va bits on unix
71a1645d4 fix build
7c331a967 merge from dev3
d21114b5f improve page commit on demand
ba6881033 commit page on demand
9a7c0d443 max obj size 1/8 of a page
b77b34df9 double arena per 4; large page objects 1/8 of large page size
3fa347671 Merge branch 'dev3' into dev3-bin
9bad269c5 fix purge delay check for arenas
c65c6d83b fix guard page size
b515a0ad4 add _mi_os_guard_page_size
88d8ee964 remove is_large member (and use is_pinned for this)
657135de3 commit 2level page-map on over-commit systems
da2ab86e9 Merge branch 'dev3' into dev3-bin
bc5ae3164 add abandoned_visit_blocks
83dacd190 free segment map when destroy_on_exit is set
04970f43e document way to use a TLS slot on windows
dd1b37c9f fix recursive tls access on macOS <= 14
8d2b7b038 merge from dev3
36bf7dfc4 Merge branch 'dev3' into dev3-bin
f605cb73e old purge delay
823f5b7ec merge from dev3
e61ab6718 cleanup
1eea4309b Merge branch 'dev3' into dev3-bin
db82baf1a cleanup, some renaming
9ecadaecd clean up
b920fc1b7 merge from dev3
773fe7ae5 support full secure build
516e64435 rename option pagemap_commit; always commit the page map on macos (for now)
6b97830f6 merge from dev3
c5cfc92f0 small fixes
a42a2a926 improving level 2 page-map
3c7d7e1f1 experiment with 2 level pagemap
8d16303aa add -mtune=native with opt arch
93fa8d895 revert back to flat address map
c9b2d3166 fix page_map initialization
56cbddfc7 initial work on a two-level page-map
1e2221f51 fix signed/unsigned; fix heap_destroy assert failure
bfc498e54 Merge branch 'dev3' into dev3-bin
d7d626cbf enable collecting from the full page queue
b99151081 merge from dev3
da17a59bd re-add deferred free and heap retired collect
5de5550c6 merge from dev3
c138fba14 merge from dev
1a6fbdf0b merge from dev
7085b6cec limit candidate search to 4
825dd4176 fix build error
476d4699f limit purgeing to one purge cycle per purge delay
108c84e85 remove req_arena parameter to arena_reserve
e3ebebb99 update lock primitive; fix arena exclusive allocation
7d46478a5 add initial load/unload for heaps
89b0d5a35 allocate heaps associated with an arena in that arena
4ad7fedd2 track os abandoned pages in a list
95aeda4cd merge subproc stats on delete
dece8a587 make stats part of a subproc
daac75af3 fix lock recursion
a5b7d7f26 subprocesses own arena's
53857ddaa Merge branch 'dev' into dev3
93e14344c use srw lock on windows
7141d9f16 remove busy wait for arena reservation
bc459b5e1 Merge branch 'dev3' of https://github.com/microsoft/mimalloc into dev3
278f1ff55 merge from dev; match test-stress
f3d83e5fa insert full pages at the end of the queue; only override page candidate if the page is not too full
b2d1b4c47 Merge branch 'dev3-bin' of https://github.com/microsoft/mimalloc into dev3-bin
efa82e1c7 Merge branch 'dev3' of https://github.com/microsoft/mimalloc into dev3
f0f4c9c00 Merge branch 'dev3' into dev3-bin
782243856 merge from dev
df82338d8 don't override a page candidate with a page that is too full
4322546a9 Merge branch 'dev3' into dev3-bin
f6408235f merge from dev
26eaa1f4e fix cmake to generate mimalloc.dll on windows
4ed44f962 update readme to use mimalloc.dll (instead of mimalloc-override.dll)
4b7313914 add updated minject v1.2 that defaults to mimalloc.dll instead of mimalloc-override.dll
f8a253e6e update IDE settings to match cmake output; in particular mimalloc-override.dll -> mimalloc.dll
13a58ac34 Merge branch 'dev3' into dev3-bin
5614c5052 don't prefer high used candidate if it is too full
2db407d1e revert back to generating mimalloc.dll instead of mimalloc-override.dll
3746bf79e small fixes; max object size  1/8th of a pages
9a4c264e7 Merge branch 'dev3' into dev3-bin
de8001c10 add specialized is_set for 1 bit
8dd605099 fix arm64ec asm
7456d22fe add link for VS generator
3a9c402e5 update readme for cmake on windows
b51c0974d fix cmake for visual studio on arm64
2876b8c0c update redirection readme
0c6235e12 add _base test for redirection
c409928f5 Merge branch 'dev' of d:\dev\mimalloc3 into dev
130227e39 update redirection modules to v1.3
02b59e0f1 Merge branch 'dev3' into dev3-bin
27d929f33 add support for arm64ec
b18e1546a merge from dev
61a112cde fix MI_ARCH test
69d2b4e99 add comments/doc
515ae8417 syntax error
636d646b9 update arch detection in cmake
2d679959b Merge branch 'dev3' into dev3-bin
264d5a670 update stat adjustment for purging
fb9093840 adjust stats more clearly to avoid double counting commits
2a3969ffc Merge branch 'dev3' into dev3-bin
58b726be6 better stats for commit on overcommit systems (by not counting on-demand commit upfront)
587eabe72 Merge branch 'dev3' into dev3-bin
84bb1c271 adjust stats more clearly to avoid double counting commits
21c05019b Merge branch 'dev' into dev3
617190880 add ajust stats to compensate for double counting
c2e0aa49c update minject to v1.1
34d03f398 atomically clear purge bits when visiting
6e2a64b81 merge from dev3
c585753dc fix purging with ranges
68a90ceb9 add ranges for purging
adfeb1f6f fix bug in bitmap_forall_ranges
fdad1a0d4 fix infoslices needed calculation
df593a3ec make timeout for tests in the pipeline up to 4 min
98171fd80 testing on arm64
d4a2813ff Merge branch 'dev3' into dev3-bin
63d0c8f86 merge from dev
ac52b6967 update arm64 redirection
6ac636e2e update readme
3feb0d6ce add Windows arm64 support in cmame; name the mimalloc dll 'mimalloc-override.dll' on Windows with cmake (to match the IDE and minject
de8d73d20 add minject for windows arm64
b47c68fef add redirection dll for windows on arm64
d5e1a62a7 add windows arm64 target to vs2022
d9397be17 comments
037cb167f comments
d2f670e6e add delay to purg'ing; call collect_retired every N generic allocs
3330d4353 remove maxaccessed from general bitmaps
e24217e69 more bbin size classes, bug fixes
df9009a06 wip: binned bitmap for the free slices
3153e5a4c small fixes
13ee94cef fix concurrent mi_tld access bug
4aeb2e100 flexible clearN_ that can start at any index
b5dfd233e fix avx2 bug with atomics
216c04f8d clean up bitmap api
4c81c3cf9 enable purging of free committed slices from arenas
42af184ce wip: start on purge
ba39e4d65 wip: start on purge
3010d5890 fix assertion
e43eb1f19 nicer debug output
b53ac835f comment
623eaedf3 add debug output for page map; free tld on thread exit
637de624b fix free bug for meta data
d5c4a16e5 lower full page retain more aggressively in a threadpool
df956c4a1 use thread spacing for reclaim as well
98879ac8b use thread spacing for reclaim as well
118bd8c97 space out threads when searching for free pages
94ce342ea maintain pages set for arenas; improve arena load/unload
aed76f291 wip: allow arena (re)loading
ccf5e36e6 use frac 8 for reclaim_on_free and reabandon; halve full_page_retain if running in a threadpool
1c8d15aba fix build error
ab53a73cb small updates
565656919 fix comments in types; fix guarded alignment bug
64eea823e use always abandon on heap delete
91215a551 ensure incompatible heaps are not absorbed
24d3c1bc1 heap meta data always uses mi_meta_zalloc
6774130c9 Merge ..\mimalloc into dev3
7bb476760 add asan/ubsan/tsan and valgrind to default debug build
64c4181ff better block alignment
c478ddaab fix MI_GUARDED build
2a1c34628 Merge branch 'dev3' of https://github.com/microsoft/mimalloc into dev3
13be5d674 use non-null tld in heap_init
7cd8f31f3 improve popcount
f37aff6ee fix for macOS 14 and earlier
6798375f4 temporarily add macOS 13 and 12 for testing
5e434a6e6 merge from dev
988637934 fix macos 15 OS name
2556a2022 fix missing void
ed3184711 fix generic ctz/clz
c5a2d1119 add extra checks for valid pointers in the pagemap, add max_vabits and debug_commit_full_pagemap options
3a92c3527 improve generic ctz/clz
e44815ed6 add bsf/bsr for compilation with older compilers (clang 7)
56a1bd7f9 fix 32 bit multiply in generic ctz/clz
f28d5c702 add cast to avoid errors on clang 7
bbcbd3cd1 add cast to avoid errors on clang 7
3f732a981 fix debug build of MI_GUARDED
8f5449d27 various fixes for test pipeline
351cb0c74 small fixes for macOS
d5ed0cc71 various improvements
68ac94c1b set default arena reserve back to 1GiB
bf2f2a8bf fix bug where only the first chunkmap field would be considered
88990cec2 merge from dev
c8607a8d0 remove os_tld and stats parameters to os interface
d9a2f76ff fix write to empty heap in mi_guarded build
2a4af6f16 comments
2084df3dd add dedicated meta data allocation for threads and tld
67cc424ad delete old files
36bb59987 merge from dev
2ed6e03d2 update optimization on haswell
68bd8744b fix spelling
e446bc27e Merge ..\mimalloc into dev3
5a06d2aeb update bit primitives
7c2b09fc3 only enable architecture specific optimization for armv8.1
c33de86da check for running in a threadpool to disable page reclaim
d0c86f3f0 specialize bitmap operations for common page sizes
bf42759d9 check heaptag on abandonded page allocation
6b52b19e3 arch specific optimizations
0e5d5831e Merge ..\mimalloc into dev3
60a8da75f Add MI_ARCHOPT support for msvc
bef52b96f Merge ../mimalloc into dev3
9631b0d4d revise visiting arenas, better bitmap scanning
469ade882 Add MI_ARCHOPT option to enable architecture specific optimizations
70115d8b8 small fixes
bf9a2ddb5 compile for 32-bit as well
659a9dd51 fix page info size and order; atomic page flags
5a5943ad3 record max_clear bit
61436a92b working simplified version without pairmaps and bitmap epoch
ec9c61c06 initial no more pairmap
7443ee317 tune free-ing and abandoning
0616ee151 change to full_page_retain
bc67be4d7 small adjustments
afe908915 more documentation; better pairmap find_and_set_to_busy, busy flag is now 0x10
45f7fb559 small fixes
bc7fe399b large bitmaps working; lock on arena_reserve
e5fdd6e11 wip: initial large bitmaps
8d9c72548 increase MAX_OBJ_SLICES to a full chunk (32MiB)
3fc2c8e27 fix assertions
666c089fc revise free reclaim; ensure unown cannot race with a free
833b091ff can run the full test suite
bd5f7de3f can run basic test
fe5a31411 add base and size to OS memid
5e95ebc7a fix free stats
c9abfe825 wip: can run mstress
d96c13456 wip: initial version with eager abandonment
bdc87fc91 readme - describe how to run under Valgrind with dynamic override
69ac69aba wip: use epoch with 512bit chunks
2f789aae9 wip: cannot compile
1d7a9f62a bug fixes
8f2a5864b pass all debug tests
9ebe941ce first version that passes the make test
55b70f158 wip
f8d04dc2b compile with clang and gcc
d15e83030 wip: rename arena blocks to slices
309fc26b4 wip: add generic find_and_xset
188294a0d wip: bug fixes
9d904e864 wip: bug fixes
978d844e1 wip: bug fixes
0f635413d wip: can run initial test
e0152ab82 wip: update any_set
9603fe8b5 can compile without missing functions
68f5fb2f4 wip: further progress on segment removal; arena allocation
46afcbe06 wip: further progress on segment removal; arena allocation
441d4fed9 wip: further progress on removing segments
71cfa45e7 wip: initial work on mimalloc3 without segments
9b7537755 Merge branch 'dev-steal' into dev
cd61eb7cf Merge pull request #961 from devnexen/windows_tighten_criterias
d2937ba3e Merge pull request #964 from diegorusso/illegal-instruction
7673aa251 ensure forced abandoned pages can be accessed after free
9b7ac9a1a clean up candidate search; add mi_collect_reduce
3adb19c84 Fix illegal instruction for older Arm architectures
b898dbe3e Merge branch 'dev' into dev-steal
71fec8caf add target_segments_per_thread option
edc7ddd37 Merge branch 'dev' into dev-steal
3a7b6f0a8 allow build time setting of sample rate
9cae0d31c Merge branch 'dev' of https://github.com/microsoft/mimalloc into dev
41029d9d4 fix azure pipeline
e7198ce39 Extend azure pipeline with Ubuntu 24 & 20, windows 2019, and macOS 15
ff56f6acb update azure pipeline to use sample rate of 1000 for guarded objects
b8dc09e3d fix asan with MI_GUARDED
d57cb0765 add guarded objects that are sampled (and fit a size range). guarded sample rate etc can be set per heap as well as defaulted with options
8ba187907 add sampling for guarded objects
8b6017d97 rename mi_debug_guarded_  to mi_guarded_
498c92e34 update guarded implementation to use block tags
c57e9b855 fix std malloc compile of the stress test
0e76fe379 add address hint to primitive allocation API
b27d154ff add virtual address bits and physical memory to the mem config
9f0a7ac0b _mi_memcpy/_mi_memzero: tighten criteria for intrinsics for windows.
54940a6a6 update mimalloc-redirect to potentially fix issue #957
e2f4fe647 update test file
b5ae6fc55 remove wrong assertion
30640233a Merge pull request #943 from asdf-bro/patch-1
c59b0cd7f Merge pull request #946 from ArtSin/fix-vsnprintf-int-long-intmax_t
b3828bba9 disable aligned hinting or SV39 mmu's, issue #939, and pr #949
5f3593333 add 0 byte to canary to prevent spurious read overflow to read the canary (issue #951, pr #953)
afba03145 Merge pull request #954 from jimwang118/fix-linux
f126b5038 update comments, set constructor priority to 101 on macOS
17802e652 fix build error on linux
3cba10e51 update mimalloc-redirect
532904c85 update mimalloc redirect to v1.2 to handle static destructors that free memory (issue #944)
ee92b337b do not reclaim segments if free-ing from a thread with an already abandoned heap (issue #944)
2b0d039cf fix assertion check
925efaeac improve windows static library initialization to account for thread local destructors (issue #944)
d951b4dd2 add missing mi_thread_done definition
6e9b38ac1 fix issue where searching for abandoned blocks would skip the first one
dfdb9cb87 cleanup process init/done
104e82170 fix fast divisor for 32-bit platforms
46e9e7fdd fix win32 compilation
e55ae0aeb fix duplicate definition on windows
f971bd6d7 fix build on windows
4377abe01 add cmake option to fall back on the fiber api do detect thread termination on windows
aa881733d reorganize primitives for process initialization; use special data segment on Windows for thread termination by default on Windows now (issue #869)
34e66778e fix MI_EXTRA_CPPDEFS setting
50d3525a8 add test for issue #944
638ea539d allow certain options to have defaults set via the pre-processor at build time -- see issue #945
394e8c27d add cmake option to add C pre processor definitions more easily
bf251b27b Fix int and long handling and the use of (u)intptr_t in _mi_vsnprintf
a7e7cbac8 use enqueue_from_full, and keep inserting at the end
0316cb1d8 reduce page search to 8
cbc0e1980 revert back to unfull at the end of queues as it slows down some benchmarks (like alloc-test1)
96877159c insert full pages that became unfull, at the start of the page queue to increase potential reuse
a05b5ab0a search N pages for a best fit
ffa8bce58 prefer pages that do not expand
f38816d4e Musl needs __libc* functions too
95f8fda11 Fix typo
cd0c4ab67 docs: update readme.md
db3d8485d increase TSAN test to 400 iterations
d8e0cb1a3 increase test timeout for azure pipeline
bb3976760 add guarded build to test pipeline
51025f1ac set lower parameters for guarded test
4234a9bd9 Merge branch 'dev-guarded' into dev
58e743b83 fix use_guarded signature
cc4dc1bb5 add comments
96f7cc4ef clean up guarded allocation
631ff581a set compile as C++ in VS IDE
b9b529de2 shuffle for 128 bit
b5c6495f6 don't consider memory as large OS pages if only madvise'd
f130808b5 fix warnings
8899a11c7 clean up guarded pages code
635cf7af6 fix multi-threaded free to unprotect guarded blocks
0c19eb60c initial working guarded pages
5eb8c752f fix UINT32_MAX constant (see issue #913)
9c9efc417 Fix build on FreeBSD-derivate DragonFly
566b2c51f Add a missing #include
7b5df14be initial work on guarded objects
632421da3 fix typos
265767766 fix alignment test
b7dd5d656 add extra assertions to check that blocks are always aligned to MI_MAX_ALIGN_SIZE
e8b5e51b0 Change macOS mmap tag to fix conflict with IOAccelerator
03020fbf8 fix count/size order in mi_heap_alloc_new_n, issue #906
d68a7fc3e update docs
8f481d34d update docs
98058eed1 add heap tag to area descriptor
8b7b3e375 add docs svg's
ab1cdbbde add search js files for docs
dee7faa6d add js for docs
272d3368a update aligned documentation
20424dbfa update doxyfile
e64684c9f update documentation
08fa86460 rename arena-abandoned to arena-abandon
e0baf882b reduce UBSAN parameters to stay within pipeline limits
b123bbe6c increase iterations for tsan test
0c322c556 add reference to page_malloc_zero in C++ build
cf10af782 re-enable tsan test in azure pipelines
b1188ea33 fix potential race on subproc field in the segment
76b0873ce fix asan tracking by explicitly setting memory to undefined before a free
3f6911993 don't reset a segment thread id when iterating
065f46cef don't reset a segment thread id when iterating
537c51e22 fix vs 2022 ide
f7ba9d9da refactor arena-abandoned to be an include for backward compat with existing build scripts
800034cb9 refactor arena abandonment in a separate file
96b69d7ef fix leak where OS abandoned blocks were not always reclaimed
00dacba91 maintain count of the abandoned os list
3333f776f push os abandoned blocks at the tail end
a04905c88 revisit atomic reclaim for abandoned segments
f02a0b354 more aggressive reclaim from free for OS blocks
1a9cf7bce switch between OS and arena allocation in stress test
7e23576ef remove old mi_abandoned_await_readers
2ed97f3eb whitespace
f17ddc339 increase thread data cache to32 entries
84334e480 decrease meta allocation zone to 4k (to reduce .bss)
58fbb6796 fix c++ compilation
6b1534270 fix pthread initalization of mutexes
768872e4e typo in stress test
e4c8f42bb always include sys/prctl.h on linux to disable THP if large_os_pages are not enabled
f9076a5cf use EFAULT if a target heap tag cannot be found on reclaim
f87ec74bb reduce delayed output from redirection to 16KiB to reduce the .bss size
e8f4bdd1e fix cast; make segment map static
a964322a2 revise the segment map to only apply to OS allocated segments and reduce the .BSS footprint
5501f59f6 only reclaim for exclusive heaps in their associated arena
635d626c8 fix leak in abandoned block visiting
f7fe5bf20 optimize heap walks, by Sam Gross, upstream of python/cpython#114133
855e3b254 add support to visit _all_ abandoned segment blocks per sub-process, upstream for python/cpython#114133
8f874555d add initial support for visiting abandoned segments per subprocess, upstream for python/cpython#114133
f93fb900b move lock code to atomic.h
0b3cd5124 add initial primitive api for locks
d9aa19a76 add support for sub-processes (to supportpython/cpython#113717)
f87a4c15b increase max arenas
aeee7907a fix spelling
616db104a prevent UB in arena reservation
78fa139a1 Build on cygwin
87d088b7e bump version to v1.8.8 for further development
1f3ecec2e update readme
4aa97336f remove the need for cmake patch in vcpkg port
bd04cec1c roll back export ignore on the bin directory as it needed by vcpkg (et al) to build on Windows
836ee0a94 add alpine docker files
d5ac4f7b9 add example docker file for testing on manylinux-x64
b9b321d32 use _builtin_thread_pointer also on gcc 11-x64 and clang-14-x64
d6ad058e4 Merge pull request #897 from madsmtm/patch-1
9cd7e4cc6 rename library check to find_link_library
f739e4f2c check all link libraries (pthread, rt, and atomic) via check_linker_flag first before using find_library (see also issue #898
03224e17a bump cmake required version to 3.18 and detect libatomic more reliably, see pr #898
7ea7296d3 add malloc_good_size override maacro, see issue #900 and pr #901
0c4041fa5 add support for custom heap and page tags, upstream of python/cpython#113742
710d6138c refactor thread meta-data initilazation, upstream of python/cpython#113263
66052f135 allow custom thread id, upstream of python/cpython#115488)
381da05d8 make mimalloc includes relative to the current file, upstream of python/cpython#113141
92a8268fa make warning an trace message if we cannot allocate at a hinted address, upstream of python/cpython#113372
c48a21215 fix arm64 windows compilation, upstream of python/cpython#111527
999b31fea allow syscall include on FreeBSD as well
87c4012f1 make syscall test in primitives positive and avoid unused function warnings. upstream python/cpython#111907, python/cpython#111593, python/cpython#117548
937fd1933 comment
d9441ffce fix compilation on AIX, upstream of python/cpython#111593
1b21415df make retry on oom an option; revise size options to not overflow the long
e58fa376d on windows, retry virtual alloc if out-of-memory, see issue #894
a05e1f486 comment to not add custom fields (issue #896)
8fd118427 fix alignment issue on Alpine 32-bit musl compilation (issue #895)
97013ee2b improve static allocation
aa91fe0f1 fix build warning on 32-bit musl
e3fea8f4e temporary fix for musl libc 32-bit compilation on alpine (see issue #895)
e7f2ffe26 fix build warning on alpine 32-bit
5eb29e971 bump version to 1.8.7 for further development
6e960f06e add note on using linker section instead of fiber api
a38c8dd0f rename must_free_whole -> has_partial_free
fefdce3ee macOS: Fix linking statically
81a771161 update readme for updated release
9e721e564 bump version to v1.8.6
eb2bab87d update readme for new release
13e519202 fix comments; nicer strdup/strndup
0f6d8293c use local dynamic tls for static MUSL builds (see issue #644)
bb3802801 clarify parameters for emmalloc_memalign
f35355b2d Merge pull request #891 from kripken/no.min
6c7cda592 make page_malloc_zero externals not inline to avoid link errors in C++ mode
b1ec1d5e5 refactor aligned allocation
0dcdc55bb better aligned test
7128db7bb simplified aligned allocation; improved codegen; fix mi_good_size with padding included; add MI_MAX_ALIGN_GUARANTEE
c70c1df16 better fast path for aligned allocation; check max alloc size correctly in the aligned fallback
605c354bd increase segment map for asan builds (issue #881)
e5267a31b only override strdup/strndup if those are not macros (issue #885)
1ebc28a8f update comment
0d22807e9 Emscripten: Remove no-longer-needed minimum emmalloc alignment
cc3c14f2e use builtin_thread_pointer only on non-apple arm64 (issue #883 and #851)
146f9d233 make TLS slot default instead of __builtin_thread_pointer. Potentially fixes build errors on various platforms (see issue #883)
77eb3a366 bump version to 1.8.5 for further development
6b6607ff5 update readme
3324e8c1e update readme
96819a3f1 update readme
c469e3d51 add release notes
a527f7516 add disallow_arena_alloc option
ce783df58 fix spelling errors (pr #710)
88aa84727 fix spelling errors (pr #710)
204348e46 only define WIN32_LEAN_AND_MEAN if needed
7247b9e32 allow configuring page and segment sizes (pr #753 and pr #862)
79ab7c63d disable transparent huge pages for a process too if the allow_large_os_pages option is set to false
e46c1145a add separate MI_LIBC_MUSL option (issue #644)
336f83fbd use __builtin_thread_pointer on arm64 with older gcc compilers (issue #851)
f7df734c6 add further C++ delete signatures to override from C (issue #863)
9830c0db4 redefine mi_nothrow_t to be a pointer to (probably) fix issue #840 to match WASI signatures
09e91ec91 add assert for segment purges
bf5932c3c use better purging for segments_collect
2b7530e18 add segment_collect for forced heap_collect
32e065bb3 rename segment_thread_collect to segment_collect
0ea2e0490 dont purge arenas on collect unless it is an explicit force (issue #878)
70eb7fb39 collect arenas even if not on the main thread (issue #878)
bb1fafa1b forward strdup/strndup to avoid leaks on macOS -- addresses PR #769
8ada517cf Merge pull request #859 from jmroot/pressure_relief
e15498c4f Merge pull request #860 from jmroot/strndup-interpose
e21801fa0 Merge branch 'dev' of https://github.com/microsoft/mimalloc into dev
c13c17f1d Merge pull request #864 from rHermes/fix-passing-heap
5050b6303 define MI_MAX_ALLOC_SIZE as PTRDIFF_MAX (related to #877)
06b510c42 fix build pipeline for ASAN
764aa4459 remove macOS preprocessor macros that do not exist (anymore). issue #879
10721ddbf Remove unneeded include
8f7d1e9a4 fix free in realpath when using ASAN
6b4f3f622 further ASAN fix
a52289923 fix compilation with ASAN
1d8997236 add comment on concurrent access in ptr_unalign
460278f11 comments
002280217 commend and make at least 8 tries for reclaim
006ae2d05 add is_huge page flag to ensure the right page queue is returned (see #868)
9c96d05ee abandoned reclaim on free is on by default
a8a53e3e8 fix double counting of free-ing for non-thread-local free calls
b5665f0ee add full block_size and page_start to page info
6688b45fb rename MI_ALIGNMENT_MAX to MI_BLOCK_ALIGNMENT_MAX for clarity
f141ca12a add extra runtime check to ensure we never insert large or huge pages in the segment free queue (issue #870)
07ae64bd8 faster check for NULL in mi_free by combining with masking
86475a7b9 use MI_MAX_ALIGN_SIZE to adjust block_offset_adj
ea6137a50 use MI_MAX_ALIGN_SIZE to adjust block_offset_adj
4f809aadb use free field for expiration instead of used
60c4a0fe5 fix compilation warnings for new uint16_t size for used field
9085596ea update comment
34d37fa20 nicer organisation of free.c
d08b4219e improve used decrement code gen
cc809b0cd take 16 bits from used field to create a fast unalign path
355f44f37 split free routines in a separate file
18ebeb8a8 fix (benign) race condition on the page flags has_aligned flag and refactor free-ing code (issue 865)
a42707908 fix typo, issue #866
3d89f6388 Fix std::shared_pointer calling free on provided heap pointers
068dc014e Avoid compilation error when passing in heap to allocators
db52999d8 update used block comment (issue #861)
f508ae552 Only interpose strndup if it exists
2e96bc9ee Fix min macOS for pressure_relief
da5204802 rename local to avoid warning in static build
5fe83bf32 limit reclaim from free to half the segments to prevent a pure freeing thread to reclaim too many segments
40517890d Merge branch 'dev' into dev-abandon
719496bac fix clang warning
fa10914f7 track os stats in the main stats directly
1314421b4 Merge pull request #857 from microsoft/users/GitHubPolicyService/7ce05ebc-d953-4b14-8ead-c6d84b9a70de
2473676e1 further fixes to macOS version checks by ensuring MAC_OS_X_VERSION_10_7 is always defined (issue #829)
56d1a859c Merge branch 'dev' into dev-abandon
027b22aaf add arena stats
d86c10540 Merge branch 'dev' into dev-abandon
018c0ce2f Microsoft mandatory file
cca3fc26b fix macOS version checks, issues #829
43d40704b keep threadid 0 for abandoned_next to preserve invariants
70e3ce07d Merge branch 'dev' into dev-abandon
c6750c51a Fix new[] / delete mismatch. #745
5fa620ac2 add bin/ to .gitattributes as export-ignore #746
683332c95 Define reallocarr as weak to avoid symbol collision on gnu/Linux. #751 by @Romain-Geissler-1A
7df348e2e fix typo, #756
e1f6516fd Fix undefined symbol errors when building for wasi #758, by @anuraaga
16c3f1292 Fix compile error on OpenBSD #773, by @sundb
128c7c187 cleanup thp disable a bit
c0da600ed Merge pull request #783 from devnexen/dev_thp_disable
182583d3d Merge branch 'dev' into dev_thp_disable
c541a9b32 Revert setting hardcoded install paths on Haiku #788, by @begasus
5d22157dc support tls_slot for PPC #781, by @barracuda156
3fe3d540b Fix incorrect MAP_HUGE_1GB check #793
7b398ad92 delete pthread key at shutdown, PR #810 by @jkriegshauser
944ec1ab8 Fix error: cannot use 'throw' with exceptions disabled #815, by @sergio-nsk
cc4500a02 ensure consistent types for template deduction, PR #834 by @dg0yt
b7d44378b avoid unused function warning on Solaris, PR #830 by @kulikjak
5634527fa add terminating quote
98abfe042 avoid syscall on openBSD, issue #821 by @blackgnezdo
d21f60f71 add emscripten WASM support; this PR #822 written by Alon Zakai @kripken
bccf10e16 allow random fallback on older macOS versions, issue #829
89afa1404 fix build on illumos; by @dancrossnyc, issue #841
1f2d799ed possible fix for #855
dfb5cadf3 don't use the new __builtin_thread_pointer on macOS
3966953b7 prefer using __builtin_thread_pointer over assembly primitives. Fixes #851 and #852 as well.
8045d5517 fix type warning on clang
3090f23c2 fix return value of get_reclaim_tries
5ce1a9bfe fix cas call
500d2ad1f ensure non-arena segments are force purged on abandonment; make non-arena reclaim atomic
16c0948ee improve display of arenas and contained blocks
f5f61a65f bump version to 1.8.4
c4f1f2e07 make reclaim tries a percentage of the abandoned count
cf8f73098 start abandoned search randomized
71bcf1c76 maintain abandoned_count more robustly
1b3eb8ef2 quick exit from try_reclaim if no abandoned segments
931d523dc update mstress to let the main thread participate
9f9305d44 use non-primitive heap default
d34d8f0f6 fix signed comparison
64edbc92d allow abandoned segment reclaim on a free
bdda13b88 track abandoned segments in an arena bitmap instead of with a list
8f353d800 set initially_zero for arena_static_zalloc
7020ed5e5 do not purge if purge delay is negative
388d1aa9b new Linux/Android option proposal.
36ee5f902 avoid warning on newer clang
1325ee640 avoid warning on newer clang
cfacbacab fix zero initialization in mi_arena_meta_zalloc, issue #750
7563ab97e fix alignment in meta_zalloc; issue #749
814dac26a add KiB to size options
c1218883a more format specifiers for _mi_vsnprintf
7fda289cb small fixes
e10467f67 add libc primitives to reduce dependencies
4a85f32f8 add libc.c source file
d7a72c491 fix thread data leak; issue #748
86d1585c5 Merge branch 'dev' of https://github.com/microsoft/mimalloc into dev
d221526a4 add minject options list to the readme
e74159486 remove deprecated from description (issue #737)
a0bd338d9 undeprecate MI_INSTALL_TOPLEVEL (issue #737)
2531f5708 update minject; possible fix for issue #734
53433225d update readme
f181afbc5 update readme
698158075 update readme
eef8ca104 update readme
40f99ce28 update readme
481243677 update readme
b66e3214d be more strict on initially_zero for arena allocation
632edf999 rename was_zero/committed to initially_zero/committed
0bb5cecbc use most performant reset on Linux (MADV_FREE) and Windows (MEM_RESET) as we use the precise decommit by default for purging anyways
7e4e54506 update readme for options and upcoming release
0ceef8e72 add fix for aligned_alloc override on musl; hopefully does not break Conda builds. issue #733
88a8b1378 revise unix decommit
bfe2651ec revise decommit on linux in debug/secure mode
4b2f6448c fix asan memory tracking for zero initialized memory
7f93bf02c be explicit about memory tracking in os.c
c9dd6f6dc fix mem tracking for asan
d4fe70008 remove spurious track_mem_defined
a59ae585c remove allow_purge option
67dcbbfa4 refine c17 check for ATOMIC_VAR_INIT
870cd98e1 Merge pull request #736 from TroutZhang/dev
e68010573 Fix ATOMIC_VAR_INIT deprecation warnings for C17
a636d88d9 remove unused local
0e1670a4f refactor arena code
4dcd611ec simplifying arena code
d81cc76bb simplifying arena code
bdead26c7 improve static alloc precision
2a6352fef add further zero initialization checks
e90ad987c add zero initialization on zero sized reallocation (issue #725)
e47adc2d2 track objects in heap destroy for ETW
012f71648 add is_zero flag to prim_commit
3bc577004 clarify return codes of VirtualAlloc (issue #731)
4cb5b4517 fix possible underflow (issue #731)
b549c88e6 review realloc
e6f364755 track os alignment and base
173382ef6 is_zero review; fix asan check
09e42aea4 clarify is_zero meaing
4d976270e review is_zero flag
b845be241 wip: use memid for OS allocation
2f878354f add arena contains check for valid pointers
10a6b303b review bitmap.c
91cd6e256 add filter files for vs2022
4a867ffd9 disable tsan as it times out on the azure pipeline
72f3ba95a reduce iterations under tsan
63ddc31d3 fix 32-bit compile warnings
e03f26b03 fix atomic signature
93175c987 increase pipeline timeout to 10min for tsan
aa1ba045a increase pipeline timeout for tsan
f42c66ccc fix build on vs2017/2019
a8c581059 Merge branch 'dev' into dev-reset
43be9c290 possible fix for warnings on armv6 (issue #719)
a52ba65f6 further fix for atomic build error suggested by Davide Di Gennaro (issue #729, pr #724)
56fde8459 Merge pull request #727 from barracuda156/darwin
4436fadd0 update alignment check
a8b9f2878 better alignment test
89e092d79 increase retire cycles to 16
4a52b7e4c use memzero_aligned
a655c28b6 cleanup
d48b988c4 clean up os api
0fc4de144 use rich memid's to simplify the internal API's and invariants
0174d19af increase thread data cache to 16
8027fcfec Merge branch 'dev' into dev-reset
d106f0c11 alloc-override-zone.c: fix for 10.6 rosetta/ppc
2647146ab prim.c: fix for macOS without MACH_TASK_BASIC_INFO
cd915900a atomic.h: unbreak build on Darwin PPC
462080a92 add test for issue #602
f30b30289 address concern #721
94e5ddd7b Merge pull request #723 from devnexen/fbsd_build_fix
5a866ca7e fix build error on Android/Linux for an atomic signature (pr #724, issue #729)
953572652 fix warnings on latest macOS
6d1855901 Merge pull request #726 from Xazax-hun/patch-1
48d0d0da9 fix thread data cache to use pure os alloc
0ba79d01f allow static allocation in arenas for internal metadata
c90a2bbd0 make memid's abstract for safety
290443aee fix assertion/invariant
a94b31d80 Fix option name for ETW tracking
eb62caeda allow per page purging instead of reset
bcbcc343e fix build on freebsd.
6bd591d67 fix tsan errors
cdefd5b69 fix stats for purging
96e9e6f57 clean up option naming
55df1f3a5 more detailed stats, including purges
b6a395b5e reset stats more early for mstress
8ddf6f96a fix purge bug in arenas
83aa63548 implement arena destroy on program exit
4c4f2f408 clean up arena function names
cb0369452 use exponetially sized arenas
8d56c155f set page_free to 0 by default
d01017ffd extend primitive api with is_zero parameters
db74fc0c9 add abandoned reader barrier
a2e1d2b89 add segment map to track valid pointers
461df1e87 implement arena exclusive heap allocation for dev
4fc597d4f more tight purge delay
77766e20a use only arena's instead of regions
1d231be75 clarify needs_recommit
5c39fe724 decommit returns whether re-commit is needed
449aad063 wip: purgeable arenas; update option names and improve arena reservation
a5b47fe17 Merge branch 'dev' into dev-reset
92556e0e6 bump version for further development
cc4ed36c7 prepare for new release
05e7931b9 prevent pedantic warning
595add5e3 wip: initial work on purgable arenas
7cf60deb1 wip: initial delayed purging of arenas
bd66d5476 Merge branch 'dev' into dev-reset
3208dff17 remove extraneous forward declarations
1a57a53b7 Merge branch 'dev' into dev-reset
d3ec7f378 fix compile on ppc64IE and s390x arches (issue #717)
6eee9e4be add option eager_reserve
8607c4a5d fix compile without syscall (pr #714 by asuka-mio)
47d8cd916 fix compile without MADV_FREE (pr #715 by elbaro)
f08d9d489 bump version for further development
6515829c8 fix readme order
20126e1c6 fix links in readme
62949f55b increment doxy file version number
06b94fc5e remove redundant code (pr #674 by @rganesan)
accdc4de7 fix MI_SKIP_COLLECT_ON_EXIT syntax (pr #671 by @Unsttopabull)
f806eb849 remove redundant OR in mmap flags (pr #675)
dd7b99d47 apply some spelling fixes from PR #710
c2a2533fb fix haiku compilation (pr #679)
2141e414a Merge pull request #708 from devnexen/new_placement_tests
61a32e62b support cygwin compilation (pr #712)
f20d22a3e fix arm compilation (PR 694)
1cb0193ff fix hex formatting of errors
5bc724d18 fix warnings on macOS
068d1d884 increase timeout in pipeline for linux for tsan run
0ca31d2db fix pipeline for tsan
8e6a47538 add ubsan and tsan to pipeline
651ff2c68 fix cmake for windows
e1e1e25d2 add ASAN to pipeline
2440e60d9 copy static.o to the cmake directory (issue #706)
8ecbc29a0 prepare readme for release
79f31b0e8 use syscalls for open/close etc when initializing to avoid recursion when these are intercepted (issue #713)
176b6e6aa add mi_arena_is_os_allocated
9792b6364 move more prototypes in internal.h for safety
560e32b2e update comments
a21ddd03f add verbose message if thread sanitizer is enabled
c9dcca6a6 update comments
d976fbe08 remove spurious include
96b55bd0b potential fix for macOS issue #697
70fefec83 fix huge OS page count when a timeout happens (issue #711)
1ded6e2de increase env limit to 10000 entries (issue #685)
06f0ba232 prevent reentrancy on thread_done (issue #699)
b89331136 Merge branch 'dev' of https://github.com/microsoft/mimalloc into dev
c92e9e7bf add comment that thread id's should not be zero, issue #698
0b4c3da2e make process init race free (issue #701)
01b460fed add std::string test for macos
30df80b05 proper prototype
54ad5e76f fix warnings for issues #709
65402836a comments
287010578 update ide project files
2f9b2f51b update 2022 ide
e24e1125e bump version to 1.8.0
0509d11ac more comments
ec5f4904b more comments
c0c762611 add prim/osx directory
f58357548 restructure header files
6ae6c4270 simplify primitives API
85a2bb5c6 update process info primitive api
cbccbbe9a c++ override test new placement operator
17a20f280 dont track ETW by default
3ebcc0bac fix syntax in cmakelists
63f88cb43 rename
1a99efc67 integrate ETW windows event tracing into mimalloc as another track tool
072316bd3 add etw support
8a1f6c82b move prim files in subdirectories
2e85af5bb Merge branch 'dev' into dev-platform
134b23b92 fix asan/valgrind api fill test
7d834864b fix macOSX compilation
c4c96d2f8 update older vs ide projects
e937070cf Merge branch 'dev' into dev-platform
824fd8a7b fix issue #707; rename a local template parameter (destroy) to work around two-phase template resolve in msvc 2019
9fb4f2a50 update vs2019 ide
cfe3d0429 cleanup
479ef4bf4 fix precise free size in aligned allocation
84ef963a4 remove conioinclude
9a2dbf373 move thread init to primitives
973268bf1 move random initialization to primitives
9b110090b move threadid and mi_get_default_heap to primitives
3579d3b86 move mi_thread_id to primitives
4348a05d0 small fixes
10f62eb5a add c primitives, move getenv into primitives
69cb30a87 move process info into primitives
08a01d26d initial commit of new primitive layer
2e6ab0f23 add documentation for tracking tools; rename with prefix MI_TRACK_tool
64fb00969 fix warning with zero padding
e912697d9 fix warning with zero padding
b3f3a0de3 include psapi.h instead of defining PROCESS_MEMORY_COUNTERS on windows
465eb81d3 track free blocks in valgrind for heap_destroy as well
82c85d1a1 fix valgrind mem for large alignment
056c2ce45 match track free size to tracked malloc size
20ae35a1d remove accidental -fsanitize
3c906bde8 better track_free_size
6dcebdc30 fix sizes in memory tracking and padding for huge alignments
e24c7c9de fix asan compilation on macOSX
6cc0ad72f match declaration of mi_malloc_size_checked on macOS
0d9e7ab61 remove extern inline from alloc_new functions to avoid link warnings
cb4fc2c79 reset stats for stress test when using mimalloc
6a230f832 fix compilation of heap specific STL allocators for vs2017
507f75b56 update vs2017 project files
389b004cd update mimalloc-redirect for win11; potential fix for issue #657, attempt 3
23868f080 update mimalloc-redirect for win11; potential fix for issue #657, attempt 2
fca492aac update mimalloc-redirect for win11; potential fix for issue #657
4cebb4806 bump version to v1.7.9
9adb032e9 test non-default heap
e68f2c147 fix recursion issue on exit on windows, #672
37d5ce949 comment out include
aa2d00fde make heap_new inline again
ef3f651f3 change implementation of mi_realpath to be more robust; see issue #660
94b8cb870 quote path in post-build event (issue #666
b701d4cbf bump cmake minimal version to 3.13 to support CMAKE_INTERPROCEDURAL_OPTIMIZATION -- see PR 656.
ab99eb583 quote path in post-build event (issue #666
4d1e74aad add comment
95b61b8c3 forward libc interface used by wasi-libc; originally by @anuraaga in PR #667 but rebased to the dev branch
2b0421a25 fix -Wunused-function for mi_strn-cmp; originally by @rui314 in PR #662 but rebased to dev branch
8c89a7706 add default constructors to stl heap allocators
95e88a699 Merge pull request #653 from vmarkovtsev/fix-const
51e2be664 Merge branch 'dev' into fix-const
4f2fdf76a add braces
dfc95f34c first try WriteFile for a redirected stderr
505a14bbd cleanup on-demand loading of psapi and bcrypt on windows
59ea84cad Merge pull request #654 from dscho/git-for-windows-assorted-fixes
089e85b11 Make MIMALLOC_SHOW_STATS work with redirected `stderr`
edb181c37 Lazy-link to `bcrypt`
948a0c44d Lazy-load `psapi.dll`
11cab6a0c Avoid `%z` format
2c40e0d02 Allow running in Windows Nano Server containers
745a34f47 Fix whitespace
ddc984101 fix parameters for mi_track_free
10981ab12 add initial support for using mimalloc with address sanitizer support; use -DMI_ASAN=ON
76db72814 fix unused parameter warning in clang
e42a22c9c fix warnings
be2bc9e7c better attributes on new/delete overrides for Microsoft visual C++
7da4a34dc Make "destroy" a compile-time constant + fix const allocator comparisons
c1299484d refactor C++ STL allocator definitions (pr #651)
4295b9cc5 Merge pull request #651 from vmarkovtsev/dry
8098040c2 add pointer validity check on malloc_size when overriding on macOSX; issue #638
2d79ae7ec Merge branch 'dev' of https://github.com/microsoft/mimalloc into dev
81b261e65 add test for #587
604d4b259 fix assertion failure (issue #650)
78af17e3b add extra alignment test
4cdfc1888 Refactor C++ allocators to be DRY and protected
4b56af178 remove ,not all freed, messag e from reserved and committed stats (as that is expected at normal process exit)
a7bd9c08c fix decommit of huge pages
e7dac7c40 prevent retiring pages in the huge queue (which may have a small size but huge alignment)
db0a69b48 remove comment
969d8bc5f make huge pages part of the regular page queues again
fed883c81 refactor mi_segment_init fix
00a42bf37 refactor mi_segment_init
78690fbec fix proteced status in stl allocator (pr #625)#
7dce31f74 reenable decommitting of a huge aligned prefix
061bbe25b update readme
9617f16df add STL allocators that use a specific heap and can destroy at the end; see original PR #625 by @vmarkovtsev
6e2b077b3 rename to heap_alloc_new and heap_alloc_new_n
34910664f add mi_heap_new_ and mi_heap_new_n
fe300ca14 fix extern inline definition (issue #643)
631f22fbd change library linkage to PRIVATE (issue #646)
e6ab602ca add comment
35d332141 experimental destroy_on_exit option for statically linked mimalloc in a dynamically unloaded DLL
18cf94dff move keys field in the page struct to keep offsets in the fast path the same for different build variants
8834e128e improve mi_free codegen
2479d168a decommit unused prefix of large aligned blocks
27fc2cf17 fix random initializer
56ab9ee06 update azure pipeline to ubuntu 22.04
841172bd7 fix link error on windows
3e1d800e9 potential fix for windows static linking with thread creation in dll's
312ce6f91 bump version to v1.7.8 for further development
2daec6c72 add more comments
1f12c3dd1 remove MI_ALIGNMENT_MAX and add comments
711aad7a7 refactor arena allocation
d1ae630de Merge branch 'dev-align' of https://github.com/microsoft/mimalloc into dev-align
3eb616f2b fix bug in secure mode where adjustment would make the page size less than the blocksize on the first page of a segment
f788e3c9a add comment
d3715132d move null ptr check
f54e64365 fix assertions with incorrect block size for large alignments
a200291ae further progress on removing aligned limit
4b91ff760 initial working large alignment
6a80fa3ac initial progress on removing alignment limit
REVERT: 91ba1f374 merge from dev
REVERT: f859190cb update to v2.0.7
REVERT: e4630e798 Merge branch 'dev' into dev-slice
REVERT: 63397d857 Merge branch 'dev' into dev-slice
REVERT: 6f8e11598 Merge branch 'dev' into dev-slice
REVERT: b3b479490 Merge branch 'dev' into dev-slice
REVERT: cb3b73ba3 merge from dev
REVERT: 933713292 merge from dev
REVERT: 9f36808a7 initial api for heaps restricted to a certain arena
REVERT: e961ef705 merge arena_id from dev
REVERT: 43ce10242 Merge branch 'dev' into dev-slice
REVERT: 923ef1ba7 Merge branch 'dev' into dev-slice
REVERT: 0b1012aee Merge branch 'dev' into dev-slice
REVERT: 3f122692e Merge branch 'dev' into dev-slice
REVERT: 4442fda89 Merge branch 'dev' into dev-slice
REVERT: cf2c2bac8 Merge branch 'dev' into dev-slice
REVERT: c128cf69b fix alignment_max for 32-bit systems (unfortunately, we need to include stdint.h now)
REVERT: 24aac114e Merge branch 'dev' into dev-slice
REVERT: a3415079e Merge branch 'dev' into dev-slice
REVERT: de21d04ba Merge branch 'dev' into dev-slice
REVERT: 66525ccae merge from dev-track
REVERT: 3d6017de7 Merge branch 'dev' into dev-slice
REVERT: cacb387a6 Merge branch 'dev' into dev-slice
REVERT: 83d84b870 increase max alignment limit to 16MiB (issue #576)
REVERT: c48c275a8 Merge branch 'dev' into dev-slice
REVERT: 945951381 Merge branch 'dev' into dev-slice
REVERT: a90b98a14 update to vs2022
REVERT: eb5deccea Merge branch 'dev' into dev-slice
REVERT: 413141ae2 merge from dev
REVERT: 487b401b2 Merge branch 'dev' into dev-slice
REVERT: a949c9321 update vs2022 solution
REVERT: 5c64f5150 Merge branch 'dev' into dev-slice
REVERT: f2712f4a8 Merge branch 'dev' into dev-slice
REVERT: f819dbb4e fix trailing comma
REVERT: 12a3a4c51 merge from dev
REVERT: f9416ce71 merge from dev
REVERT: b86bbbff0 merge from dev
REVERT: dd929659a fix wrong assertion
REVERT: 4b95e8ea1 Merge branch 'dev' into dev-slice
REVERT: a3ced56b1 merge from dev
REVERT: 0a1d0bbcb Merge branch 'dev' into dev-slice
REVERT: 7e492f442 merge from dev
REVERT: 157c9b096 Merge branch 'dev' into dev-slice
REVERT: 12c91999a Merge branch 'dev' into dev-slice
REVERT: 774d12f12 merge from dev
REVERT: ea0f5b877 use new MI_ATOMIC_VAR_INIT
REVERT: 2d8f13fb9 Merge branch 'dev-slice' of https://github.com/microsoft/mimalloc into dev-slice
REVERT: 862f07bc7 Merge branch 'dev' into dev-slice
REVERT: 131b62283 Merge branch 'dev' into dev-slice
REVERT: 984e946f7 Merge branch 'dev' into dev-slice
REVERT: 196ceeac5 merge from dev
REVERT: 6431176f4 Merge branch 'dev' into dev-slice
REVERT: 2a4a3dfa2 Merge branch 'dev' into dev-slice
REVERT: 0075a8187 Merge branch 'dev' into dev-slice
REVERT: 88f9c9410 Merge branch 'dev' into dev-slice
REVERT: 0cda8b02d fix stats for large objects that were off by the block size padding
REVERT: 332346b68 remove unneeded MI_HUGE_OBJ_SIZE_MAX
REVERT: 1e4f0c58d Merge branch 'dev' into dev-slice
REVERT: 8509ce209 Merge branch 'dev' into dev-slice
REVERT: 9f6cbc50e use heap_stat_decrease when possible
REVERT: 5a90a2a9a merge from dev
REVERT: 1f089e99f Merge branch 'dev' into dev-slice
REVERT: 18c189170 Merge branch 'dev' into dev-slice
REVERT: 10da1af59 merge from dev
REVERT: b89b4fd18 fix v2.0.5 version
REVERT: 19edc880d merge from dev
REVERT: a1310047c Merge branch 'dev-slice' of https://github.com/microsoft/mimalloc into dev-slice
REVERT: e91ee4c38 Merge branch 'dev' into dev-slice
REVERT: 26695dc58 Merge branch 'dev' into dev-slice
REVERT: 221f96ac2 Merge branch 'dev' into dev-slice
REVERT: 96008c55d fix ubsan warning on huge allocations (issue #543)
REVERT: 352d8be23 Merge branch 'dev' into dev-slice
REVERT: e87b1d229 add extra huge allocation test
REVERT: f2b6938d6 fix start adjustment for the commit mask
REVERT: 47f8caad4 improve commit chunk alignment
REVERT: 8ec83f694 increase min commit to 2 mib
REVERT: e11100a13 add minimal commit size for increased efficiency (decommit fine grained, commit coarse grained)
REVERT: 9ca363d0e merge from dev
REVERT: 0e2df7182 increase minimal commit size to 8*slice-size and add decommit_extend_delay as option
REVERT: fb418831d only delay eager commit after the first thread
REVERT: 0dd5a2e0a Merge branch 'dev' into dev-slice
REVERT: 0e1beb001 check for decommit allowed before purging the segment cache
REVERT: cbcee4dce merge from dev
REVERT: 741d39a00 fix over aggressive decommit of abandoned pages
REVERT: b365623b1 merge from dev
REVERT: 4e65b5018 clean up options
REVERT: 932f86610 decommit segment cache on force collect
REVERT: ccfe00573 decommit in abandoned pages on mi_collect
REVERT: bd2ac3c92 collect segment cache on mi_collect
REVERT: 05aa7648b merge from dev
REVERT: bfea3e2fc Merge branch 'dev' into dev-slice
REVERT: 3b93554ce merge from dev
REVERT: 1718fc811 merge from dev
REVERT: 44e7eb12d Merge branch 'dev' into dev-slice
REVERT: df01e463b Merge branch 'dev' into dev-slice
REVERT: e115a655d Merge branch 'dev' into dev-slice
REVERT: a74c05c6c Merge branch 'dev' into dev-slice
REVERT: a763b6310 merge from dev
REVERT: ae1c06d94 merge from dev
REVERT: f317225a7 ignore reset_decommits option in the 2.x / dev-slice version
REVERT: 0842004b6 Merge branch 'dev' into dev-slice
REVERT: 9f9c77e6b Merge branch 'dev' into dev-slice
REVERT: 3eac4a912 Merge branch 'dev' into dev-slice
REVERT: c4b934c2a Merge branch 'dev' into…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants