mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +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
|
|
@ -74,6 +74,9 @@ typedef struct {
|
|||
(PDATA), (DATA_SIZE)); \
|
||||
} while (0)
|
||||
|
||||
#define _Py_HASHTABLE_ENTRY_WRITE_DATA(TABLE, ENTRY, DATA) \
|
||||
_Py_HASHTABLE_ENTRY_WRITE_PDATA(TABLE, ENTRY, sizeof(DATA), &(DATA))
|
||||
|
||||
|
||||
/* _Py_hashtable: prototypes */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue