Skip to content

Commit 6eb4ec8

Browse files
authored
Fix calculation of PyListObject size in allocator
1 parent 8a73478 commit 6eb4ec8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Objects/listobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ _PyList_DebugMallocStats(FILE *out)
234234
_PyDebugAllocatorStats(out,
235235
"free PyListObject",
236236
_Py_FREELIST_SIZE(lists),
237-
sizeof(PyListObject));
237+
_PyType_PreHeaderSize(&PyList_Type) + sizeof(PyListObject));
238238
}
239239

240240
PyObject *

0 commit comments

Comments
 (0)