* 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:
Victor Stinner 2016-03-23 09:38:54 +01:00
parent e8c6b2fd1b
commit ca79ccd9e6
3 changed files with 31 additions and 12 deletions

View file

@ -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 */