The Wayback Machine - https://web.archive.org/web/20221218083032/https://github.com/python/cpython/issues/100251
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

Clarify the situation with the memory allocation for PyConfig.home #100251

Open
mmomtchev opened this issue Dec 14, 2022 · 0 comments
Open

Clarify the situation with the memory allocation for PyConfig.home #100251

mmomtchev opened this issue Dec 14, 2022 · 0 comments
Labels
docs Documentation in the Doc dir

Comments

@mmomtchev
Copy link

mmomtchev commented Dec 14, 2022

Documentation

https://docs.python.org/3/c-api/init_config.html#c.PyConfig.home

Empirically, it seems that CPython expects this value to be allocated with malloc() as it will try to free() it when finalizing the environment. This is in stark contrast to the now deprecated Py_SetPythonHome which expected that the value is statically allocated.

@mmomtchev mmomtchev added the docs Documentation in the Doc dir label Dec 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir
Projects
None yet
Development

No branches or pull requests

1 participant