You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Expose tracemalloc C API to track/untrack memory blocks #74240
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2017-06-20.15:47:31.122>created_at=<Date2017-04-12.13:42:25.341>labels= ['type-feature', '3.7']
title='Expose tracemalloc C API to track/untrack memory blocks'updated_at=<Date2017-06-20.15:47:31.121>user='https://github.com/vstinner'
The issue bpo-26530 added a private C API to manually track/untrack memory blocks in tracemalloc. I was just validated by Julian Taylor who confirms that the API works as expected: http://bugs.python.org/issue26530#msg291551
So I propose to make the 3 newly added functions public and document them:
I am not sure if _PyTraceMalloc_GetTraceback really needs to be a public function.
Exposing the tracing information should probably just go over python interfaces.
Activity
vstinner commentedon Apr 12, 2017
The issue bpo-26530 added a private C API to manually track/untrack memory blocks in tracemalloc. I was just validated by Julian Taylor who confirms that the API works as expected:
http://bugs.python.org/issue26530#msg291551
So I propose to make the 3 newly added functions public and document them:
jtaylor commentedon Apr 12, 2017
I am not sure if _PyTraceMalloc_GetTraceback really needs to be a public function.
Exposing the tracing information should probably just go over python interfaces.
vstinner commentedon Apr 12, 2017
What's the status in numpy? Is the current numpy release able to use CPython 3.6 tracemalloc private functions?
jtaylor commentedon Apr 12, 2017
With this changeset it would:
numpy/numpy#8885
vstinner commentedon Apr 21, 2017
@jtaylor: Ok, I created #1236
vstinner commentedon Jun 20, 2017
New changeset 5ea4c06 by Victor Stinner in branch 'master':
bpo-30054: Expose tracemalloc C API (bpo-1236)
5ea4c06
vstinner commentedon Jun 20, 2017
I merged my PR: the future Python 3.7 will provide a public C API to track memory allocations.