-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
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
gh-116984: Install mimalloc headers #116985
Conversation
c0f3b47
to
deef17c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should only install the headers if Python is built with mimalloc (i.e., not configured with --without-mimalloc
).
3d63aa4
to
a969e35
Compare
a969e35
to
78c228b
Compare
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me, but I'll wait for other people to leave their feedback.
As written in the devguide, for users, the internal API is sometimes "the best workaround for a thorny problem", so we want it to compile successfully in an Python installation.
At the same time, we don't always prefix names with Py
or _Py
in the internal API, so including CPython internal headers can lead to language level name conflicts. In this case, if an extensions includes our internal headers and bundles mimalloc, they could run into problems. While not ideal, I don't think that's a reason not to make the internal headers compile at all in installations.
Hi @vstinner , would you like to help landing this? |
Thanks @oraluben and @colesbury! |
This PR installs mimalloc headers and allow extensions that access
pycore_*.h
continue working.Such extensions need to explicitly add
internal/mimalloc
to its header search path.