mirror of
https://github.com/python/cpython.git
synced 2025-08-22 01:35:16 +00:00
Issue #26588:
* Optimize tracemalloc_add_trace(): modify hashtable entry data (trace) if the memory block is already tracked, rather than trying to remove the old trace and then add a new trace. * Add _Py_HASHTABLE_ENTRY_WRITE_DATA() macro
This commit is contained in:
parent
e8c6b2fd1b
commit
ca79ccd9e6
3 changed files with 31 additions and 12 deletions
|
@ -34,7 +34,7 @@ typedef unsigned int _PyTraceMalloc_domain_t;
|
|||
|
||||
Return -2 if tracemalloc is disabled.
|
||||
|
||||
If memory block was already tracked, begin by removing the old trace. */
|
||||
If memory block is already tracked, update the existing trace. */
|
||||
PyAPI_FUNC(int) _PyTraceMalloc_Track(
|
||||
_PyTraceMalloc_domain_t domain,
|
||||
Py_uintptr_t ptr,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue