Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
gh-90815: Add mimalloc memory allocator#31164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Conversation
tiran commented Feb 6, 2022 • edited by ericsnowcurrently
Loading Uh oh!
There was an error while loading. Please reload this page.
edited by ericsnowcurrently
Uh oh!
There was an error while loading. Please reload this page.
bedevere-bot commented Feb 6, 2022
🤖 New build scheduled with the buildbot fleet by @tiran for commit d4d545e5d54cced48793a1e67d36553588d4c560 🤖 If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again. |
d4d545e to d6f5f01Comparebedevere-bot commented Feb 8, 2022
🤖 New build scheduled with the buildbot fleet by @tiran for commit 973b6178c0b46c2cd839b06cbe543ea039962442 🤖 If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again. |
bedevere-bot commented Feb 9, 2022
🤖 New build scheduled with the buildbot fleet by @tiran for commit 9b8d0dac0c8ca184f0d7a93ee4b880edcacf64fd 🤖 If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again. |
bedevere-bot commented Feb 9, 2022
🤖 New build scheduled with the buildbot fleet by @tiran for commit a9c29e66902900022bd74357647d0cc8c1538292 🤖 If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again. |
bedevere-bot commented Feb 9, 2022
🤖 New build scheduled with the buildbot fleet by @tiran for commit e7231f186360d756df7d1320e39433fb46077e99 🤖 If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again. |
bedevere-bot commented Feb 9, 2022
🤖 New build scheduled with the buildbot fleet by @tiran for commit 2472ecbf4e4723186145d3476dcbee7ef95cb8a4 🤖 If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again. |
bedevere-bot commented Feb 10, 2022
🤖 New build scheduled with the buildbot fleet by @tiran for commit 10498c3826865ac62811be3a61db019b01f23fc8 🤖 If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again. |
neonene commented Feb 11, 2022 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
JFYI on Windows,
|
210b5db to 60d6011Comparetiran commented Aug 30, 2022
I have rebased the PR again. |
bedevere-bot commented Aug 30, 2022
ericsnowcurrently commented Aug 30, 2022
Thanks! |
bobfang1992 commented Apr 15, 2023
Hi, just want to check if this is still under development? |
zooba commented Apr 25, 2023
tiran is currently taking a break, so it's not being actively developed. I think we're still interested in using mimalloc though? Probably @ericsnowcurrently is the best person to sync with. |
erlend-aasland commented Apr 25, 2023
... or @colesbury. |
ericsnowcurrently commented Apr 25, 2023
FWIW, I don't have much relationship with this effort currently. At one point I thought I needed it for per-interpreter GIL, but realized later I didn't. That said, I would like to see this happen as I think it opens up several valuable opportunities to us. Furthermore, I did work with @daanx, the creator of mimalloc, to address the remaining issues, so this PR should be mostly ready, aside from conflicts and pulling in the latest mimalloc. Ultimately, this change will probably need a PEP. (I also don't know what our options are regarding linking mimalloc in rather than vendoring it.) Other than that, I don't have much insight to offer, sadly. |
daanx commented Apr 25, 2023
Hi, @daanx here from mimalloc -- let me know if I can help with this PR. Just wanted to add that it would be good to merge the latest version of mimalloc as recently I made many improvements in particular for Valgrind and ASAN (and ETW) tools. |
* Add mimalloc v2.12 Modified src/alloc.c to remove include of alloc-override.c and not compile new handler. Did not include the following files: - include/mimalloc-new-delete.h - include/mimalloc-override.h - src/alloc-override-osx.c - src/alloc-override.c - src/static.c - src/region.c mimalloc is thread safe and shares a single heap across all runtimes, therefore finalization and getting global allocated blocks across all runtimes is different. * mimalloc: minimal changes for use in Python: - remove debug spam for freeing large allocations - use same bytes (0xDD) for freed allocations in CPython and mimalloc This is important for the test_capi debug memory tests * Don't export mimalloc symbol in libpython. * Enable mimalloc as Python allocator option. * Add mimalloc MIT license. * Log mimalloc in Lib/test/pythoninfo.py. * Document new mimalloc support. * Use macro defs for exports as done in: #31164 Co-authored-by: Sam Gross <colesbury@gmail.com> Co-authored-by: Christian Heimes <christian@python.org> Co-authored-by: Victor Stinner <vstinner@python.org>
erlend-aasland commented Oct 30, 2023
Superseded by #109914. |
* Add mimalloc v2.12 Modified src/alloc.c to remove include of alloc-override.c and not compile new handler. Did not include the following files: - include/mimalloc-new-delete.h - include/mimalloc-override.h - src/alloc-override-osx.c - src/alloc-override.c - src/static.c - src/region.c mimalloc is thread safe and shares a single heap across all runtimes, therefore finalization and getting global allocated blocks across all runtimes is different. * mimalloc: minimal changes for use in Python: - remove debug spam for freeing large allocations - use same bytes (0xDD) for freed allocations in CPython and mimalloc This is important for the test_capi debug memory tests * Don't export mimalloc symbol in libpython. * Enable mimalloc as Python allocator option. * Add mimalloc MIT license. * Log mimalloc in Lib/test/pythoninfo.py. * Document new mimalloc support. * Use macro defs for exports as done in: python#31164 Co-authored-by: Sam Gross <colesbury@gmail.com> Co-authored-by: Christian Heimes <christian@python.org> Co-authored-by: Victor Stinner <vstinner@python.org>
* Add mimalloc v2.12 Modified src/alloc.c to remove include of alloc-override.c and not compile new handler. Did not include the following files: - include/mimalloc-new-delete.h - include/mimalloc-override.h - src/alloc-override-osx.c - src/alloc-override.c - src/static.c - src/region.c mimalloc is thread safe and shares a single heap across all runtimes, therefore finalization and getting global allocated blocks across all runtimes is different. * mimalloc: minimal changes for use in Python: - remove debug spam for freeing large allocations - use same bytes (0xDD) for freed allocations in CPython and mimalloc This is important for the test_capi debug memory tests * Don't export mimalloc symbol in libpython. * Enable mimalloc as Python allocator option. * Add mimalloc MIT license. * Log mimalloc in Lib/test/pythoninfo.py. * Document new mimalloc support. * Use macro defs for exports as done in: python#31164 Co-authored-by: Sam Gross <colesbury@gmail.com> Co-authored-by: Christian Heimes <christian@python.org> Co-authored-by: Victor Stinner <vstinner@python.org>
* Add mimalloc v2.12 Modified src/alloc.c to remove include of alloc-override.c and not compile new handler. Did not include the following files: - include/mimalloc-new-delete.h - include/mimalloc-override.h - src/alloc-override-osx.c - src/alloc-override.c - src/static.c - src/region.c mimalloc is thread safe and shares a single heap across all runtimes, therefore finalization and getting global allocated blocks across all runtimes is different. * mimalloc: minimal changes for use in Python: - remove debug spam for freeing large allocations - use same bytes (0xDD) for freed allocations in CPython and mimalloc This is important for the test_capi debug memory tests * Don't export mimalloc symbol in libpython. * Enable mimalloc as Python allocator option. * Add mimalloc MIT license. * Log mimalloc in Lib/test/pythoninfo.py. * Document new mimalloc support. * Use macro defs for exports as done in: python#31164 Co-authored-by: Sam Gross <colesbury@gmail.com> Co-authored-by: Christian Heimes <christian@python.org> Co-authored-by: Victor Stinner <vstinner@python.org>
https://bugs.python.org/issue46657
gh-90815