Skip to content

Commit 8dfae59

Browse files
authored
Fix size calculation in _PyDict_DebugMallocStats
1 parent 6eb4ec8 commit 8dfae59

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Objects/dictobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ _PyDict_DebugMallocStats(FILE *out)
443443
{
444444
_PyDebugAllocatorStats(out, "free PyDictObject",
445445
_Py_FREELIST_SIZE(dicts),
446-
sizeof(PyDictObject));
446+
_PyType_PreHeaderSize(&PyDict_Type) + sizeof(PyDictObject));
447447
_PyDebugAllocatorStats(out, "free PyDictKeysObject",
448448
_Py_FREELIST_SIZE(dictkeys),
449449
sizeof(PyDictKeysObject));

0 commit comments

Comments
 (0)