Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
tiran wants to merge19 commits intopython:mainfromtiran:bpo-46657-mimalloc

Conversation

tiran
Copy link
Member

@tirantiran commentedFeb 6, 2022
edited by ericsnowcurrently
Loading

bratao, vovavili, erlend-aasland, dgiger42, rdenadai, Rongronggg9, vasily-v-ryabov, shihai1991, and rbtz-openai reacted with heart emoji
@tirantiran added the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelFeb 6, 2022
@bedevere-bot
Copy link

🤖 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.

@bedevere-botbedevere-bot removed the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelFeb 6, 2022
@tirantiran added the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelFeb 8, 2022
@bedevere-bot
Copy link

🤖 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-botbedevere-bot removed the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelFeb 8, 2022
@tirantiran added the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelFeb 9, 2022
@bedevere-bot
Copy link

🤖 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-botbedevere-bot removed the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelFeb 9, 2022
@tirantiran added the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelFeb 9, 2022
@bedevere-bot
Copy link

🤖 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-botbedevere-bot removed the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelFeb 9, 2022
@tirantiran added the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelFeb 9, 2022
@bedevere-bot
Copy link

🤖 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-botbedevere-bot removed the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelFeb 9, 2022
@tirantiran added the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelFeb 9, 2022
@bedevere-bot
Copy link

🤖 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-botbedevere-bot removed the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelFeb 9, 2022
@tirantiran added the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelFeb 10, 2022
@bedevere-bot
Copy link

🤖 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.

@bedevere-botbedevere-bot removed the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelFeb 10, 2022
@neonene
Copy link
Contributor

neonene commentedFeb 11, 2022
edited
Loading

JFYI on Windows,

  • test_fstring.test_many_expressions reserves 150MB memory which seems never released. The following case holds 500MB:
build_fstr = lambda n: "f'" + ('{1}' * n) + "'"exec(build_fstr(350)*1000)
  • MSVC fails to build x86 PGO, without generatingpython311*.pgc profiles iftest_embed.EmbeddingTests.test_bpo20891 is used for an exercise. The same goes for x64 PGO when trained with only the test. (Fixed or improved bygh-94790)
ericsnowcurrently reacted with thumbs up emoji

@tirantiranforce-pushed thebpo-46657-mimalloc branch 3 times, most recently from210b5db to60d6011CompareMarch 10, 2022 12:10
@tiran
Copy link
MemberAuthor

I have rebased the PR again.

@tirantiran added the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelAug 30, 2022
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by@tiran for commit65af44c 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

@bedevere-botbedevere-bot removed the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelAug 30, 2022
@ericsnowcurrently
Copy link
Member

Thanks!

@bobfang1992
Copy link

Hi, just want to check if this is still under development?

@zooba
Copy link
Member

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
Copy link
Contributor

Probably@ericsnowcurrently is the best person to sync with.

... or@colesbury.

@ericsnowcurrently
Copy link
Member

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, Iwould 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 addressthe 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 reacted with thumbs up emoji

@daanx
Copy link

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.

vasily-v-ryabov and thesamesam reacted with thumbs up emoji

DinoV added a commit to DinoV/cpython that referenced this pull requestOct 2, 2023
DinoV added a commit to DinoV/cpython that referenced this pull requestOct 10, 2023
DinoV added a commit to DinoV/cpython that referenced this pull requestOct 12, 2023
vstinner added a commit that referenced this pull requestOct 30, 2023
* Add mimalloc v2.12Modified src/alloc.c to remove include of alloc-override.c and notcompile 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.cmimalloc is thread safe and shares a single heap across all runtimes,therefore finalization and getting global allocated blocks across allruntimes 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:#31164Co-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
Copy link
Contributor

Superseded by#109914.

FullteaR pushed a commit to FullteaR/cpython that referenced this pull requestNov 3, 2023
* Add mimalloc v2.12Modified src/alloc.c to remove include of alloc-override.c and notcompile 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.cmimalloc is thread safe and shares a single heap across all runtimes,therefore finalization and getting global allocated blocks across allruntimes 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#31164Co-authored-by: Sam Gross <colesbury@gmail.com>Co-authored-by: Christian Heimes <christian@python.org>Co-authored-by: Victor Stinner <vstinner@python.org>
aisk pushed a commit to aisk/cpython that referenced this pull requestFeb 11, 2024
* Add mimalloc v2.12Modified src/alloc.c to remove include of alloc-override.c and notcompile 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.cmimalloc is thread safe and shares a single heap across all runtimes,therefore finalization and getting global allocated blocks across allruntimes 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#31164Co-authored-by: Sam Gross <colesbury@gmail.com>Co-authored-by: Christian Heimes <christian@python.org>Co-authored-by: Victor Stinner <vstinner@python.org>
Glyphack pushed a commit to Glyphack/cpython that referenced this pull requestSep 2, 2024
* Add mimalloc v2.12Modified src/alloc.c to remove include of alloc-override.c and notcompile 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.cmimalloc is thread safe and shares a single heap across all runtimes,therefore finalization and getting global allocated blocks across allruntimes 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#31164Co-authored-by: Sam Gross <colesbury@gmail.com>Co-authored-by: Christian Heimes <christian@python.org>Co-authored-by: Victor Stinner <vstinner@python.org>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@rhettingerrhettingerAwaiting requested review from rhettingerrhettinger will be requested when the pull request is marked ready for reviewrhettinger is a code owner

@FFY00FFY00Awaiting requested review from FFY00FFY00 will be requested when the pull request is marked ready for reviewFFY00 is a code owner

@ericsnowcurrentlyericsnowcurrentlyAwaiting requested review from ericsnowcurrentlyericsnowcurrently will be requested when the pull request is marked ready for reviewericsnowcurrently is a code owner

@ZeroIntensityZeroIntensityAwaiting requested review from ZeroIntensityZeroIntensity will be requested when the pull request is marked ready for reviewZeroIntensity is a code owner

@erlend-aaslanderlend-aaslandAwaiting requested review from erlend-aaslanderlend-aasland will be requested when the pull request is marked ready for reviewerlend-aasland is a code owner

@corona10corona10Awaiting requested review from corona10corona10 will be requested when the pull request is marked ready for reviewcorona10 is a code owner

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

10 participants
@tiran@bedevere-bot@neonene@ericsnowcurrently@zooba@bobfang1992@erlend-aasland@daanx@the-knights-who-say-ni@ezio-melotti

[8]ページ先頭

©2009-2025 Movatter.jp