diff options
author | David Malcolm <dmalcolm@redhat.com> | 2012-06-22 14:55:41 -0400 |
---|---|---|
committer | David Malcolm <dmalcolm@redhat.com> | 2012-06-22 14:55:41 -0400 |
commit | c66679874d42ebaddde9958928171a8bb318b116 (patch) | |
tree | 1b3fa840264d3c74665678ee7e8735fafe44125d /Objects/setobject.c | |
parent | ec1b06d577d16cf06f2789b8e556781a276d54b1 (diff) | |
download | cpython-c66679874d42ebaddde9958928171a8bb318b116.tar.gz |
Issue #14785: Add sys._debugmallocstats() to help debug low-level memory allocation issues
Diffstat (limited to 'Objects/setobject.c')
-rw-r--r-- | Objects/setobject.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Objects/setobject.c b/Objects/setobject.c index b903fbee80..3e91572d32 100644 --- a/Objects/setobject.c +++ b/Objects/setobject.c @@ -1133,6 +1133,16 @@ PySet_Fini(void) Py_CLEAR(emptyfrozenset); } +/* Print summary info about the state of the optimized allocator */ +void +_PySet_DebugMallocStats(FILE *out) +{ + _PyDebugAllocatorStats(out, + "free PySetObject", + numfree, sizeof(PySetObject)); +} + + static PyObject * set_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { |