Skip to content

Commit dcf0299

Browse files
committed
Update vendored mimalloc to upstream dev3
Sync Objects/mimalloc and Include/internal/mimalloc with microsoft/mimalloc dev3 (1ff2382, "fix profile timestamps"). Most of the local edits previously carried in the vendored copy have been merged upstream (forceinline declaration order, WASI page size, quoted includes, MSan syscalls, Emscripten builtin allocator, MI_NO_ALIGN_FALLBACK_WARNING, MI_NO_CXX_NEW_HANDLER, __ImageBase, trailing whitespace). The FLS init assertion fix is dropped as CPython no longer uses MI_WIN_INIT_USE_FLS. Changes still carried on top of dev3 (proposed upstream): - Fix build with MI_NO_THP after the MADV_NOHUGEPAGE change - Fix -Wsign-compare warning when reading hpage_pmd_size - Fix data race on the thread-done pthread key at process exit CPython-specific change: - Purge expired ranges on arena free, as in mimalloc v2, to keep the peak memory of short-running processes at v2 levels. Define MI_NO_ALIGN_FALLBACK_WARNING in pycore_mimalloc.h, since the vendored copy now has the upstream opt-out instead of the warning being commented out.
1 parent e8351ce commit dcf0299

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎Include/internal/pycore_mimalloc.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
// CPython never uses mimalloc's C++ operator new APIs, so don't define a weak
1818
// std::get_new_handler() (_ZSt15get_new_handlerv) in libpython.
1919
# define MI_NO_CXX_NEW_HANDLER 1
20+
// The aligned OS allocation fallback is benign, but its warning is printed to
21+
// stderr and breaks tests that check output (e.g. test_cmd_line under ASan).
22+
# define MI_NO_ALIGN_FALLBACK_WARNING 1
2023
# ifdef Py_GIL_DISABLED
2124
# define MI_PRIM_THREAD_ID _Py_ThreadId
2225
# define MI_CPYTHON 1

0 commit comments

Comments
 (0)