Skip to content
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

Require mimalloc explicitly on all GNU Python 3.13 builds #391

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

zanieb
Copy link
Member

@zanieb zanieb commented Nov 11, 2024

Previously, it was only explicitly required for the freethreaded builds

Closes #389

@colesbury
Copy link

The --with-mimalloc option is the default, so I think 3.13 it's already built with it. The configure option just adds build time support. You need to set the environment variable PYTHONMALLOC=mimalloc to use mimalloc in the default build. (The free threading build requires and always uses mimalloc.)

I ran PYTHONMALLOC=mimalloc uv run -p 3.13 python -c "while True: x = object()" locally and I see mimalloc functions being executed in perf top.

@zanieb
Copy link
Member Author

zanieb commented Nov 13, 2024

Thanks for the info! It's the default if it's available, which it should be for most of our builds but it might be nice to make it explicit so it fails if it's not available for some reason. Notably the musl builds don't have a sufficient LLVM version for mimalloc and fail here — this is a known issue, ref #326 (comment).

Previously, it was only used for the freethreaded builds
@zanieb zanieb changed the title Use mimalloc on all Python 3.13 builds Require mimalloc explicitly on all Python 3.13 builds Dec 17, 2024
@zanieb zanieb changed the title Require mimalloc explicitly on all Python 3.13 builds Require mimalloc explicitly on all GNU Python 3.13 builds Dec 17, 2024
@zanieb zanieb merged commit ed051a7 into main Dec 17, 2024
316 checks passed
@zanieb zanieb deleted the zb/mimalloc-313 branch December 17, 2024 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build Python 3.13 non free threaded using mimalloc
2 participants