diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2016-03-23 08:38:54 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2016-03-23 08:38:54 (GMT) |
commit | ca79ccd9e69641330d4002acac1bfeeb2dccda32 (patch) | |
tree | 5c7db82460bd48e35530aa8658ae6c9f0d19d87e /Modules/hashtable.h | |
parent | e8c6b2fd1bb75c6a3865745de30f26e235d3f12f (diff) | |
download | cpython-ca79ccd9e69641330d4002acac1bfeeb2dccda32.zip cpython-ca79ccd9e69641330d4002acac1bfeeb2dccda32.tar.gz cpython-ca79ccd9e69641330d4002acac1bfeeb2dccda32.tar.bz2 |
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
Diffstat (limited to 'Modules/hashtable.h')
-rw-r--r-- | Modules/hashtable.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/hashtable.h b/Modules/hashtable.h index 9c3fbdd..e3e8148 100644 --- a/Modules/hashtable.h +++ b/Modules/hashtable.h @@ -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 */ |