diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2012-06-22 19:13:34 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-06-22 19:13:34 (GMT) |
commit | 5f6213be2d5890d7bc3ba62db58ac1ce0215aaaa (patch) | |
tree | e818110e6015c9666cac9d1d3107ca656719811a /Objects/tupleobject.c | |
parent | f7338f65fb8bdb85c52dc54d06d003a82a06bbb3 (diff) | |
parent | 49526f48fc73d3ccdf09d466ed2d39a30e4df9b9 (diff) | |
download | cpython-5f6213be2d5890d7bc3ba62db58ac1ce0215aaaa.zip cpython-5f6213be2d5890d7bc3ba62db58ac1ce0215aaaa.tar.gz cpython-5f6213be2d5890d7bc3ba62db58ac1ce0215aaaa.tar.bz2 |
Merge
Diffstat (limited to 'Objects/tupleobject.c')
-rw-r--r-- | Objects/tupleobject.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c index d103b9b..013db69 100644 --- a/Objects/tupleobject.c +++ b/Objects/tupleobject.c @@ -45,6 +45,22 @@ show_track(void) } #endif +/* Print summary info about the state of the optimized allocator */ +void +_PyTuple_DebugMallocStats(FILE *out) +{ +#if PyTuple_MAXSAVESIZE > 0 + int i; + char buf[128]; + for (i = 1; i < PyTuple_MAXSAVESIZE; i++) { + PyOS_snprintf(buf, sizeof(buf), + "free %d-sized PyTupleObject", i); + _PyDebugAllocatorStats(out, + buf, + numfree[i], _PyObject_VAR_SIZE(&PyTuple_Type, i)); + } +#endif +} PyObject * PyTuple_New(register Py_ssize_t size) |