[Python-checkins] CVS: python/dist/src/Include pymem.h,2.10,2.11

Tim Peters tim_one@users.sourceforge.net
Sun, 31 Mar 2002 22:04:23 -0800


Update of /cvsroot/python/python/dist/src/Include
In directory usw-pr-cvs1:/tmp/cvs-serv19323/python/Include

Modified Files:
	pymem.h 
Log Message:
New PYMALLOC_DEBUG function void _PyMalloc_DebugDumpStats(void).
This displays stats about the # of arenas, pools, blocks and bytes, to
stderr, both used and reserved but unused.

CAUTION:  Because PYMALLOC_DEBUG is on, the debug malloc routine adds
16 bytes to each request.  This makes each block appear two size classes
higher than it would be if PYMALLOC_DEBUG weren't on.

So far, playing with this confirms the obvious:  there's a lot of activity
in the "small dict" size class, but nothing in the core makes any use of
the 8-byte or 16-byte classes.


Index: pymem.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/pymem.h,v
retrieving revision 2.10
retrieving revision 2.11
diff -C2 -d -r2.10 -r2.11
*** pymem.h	28 Mar 2002 07:32:11 -0000	2.10
--- pymem.h	1 Apr 2002 06:04:21 -0000	2.11
***************
*** 103,106 ****
--- 103,107 ----
  DL_IMPORT(void) _PyMalloc_DebugDumpAddress(const void *p);
  DL_IMPORT(void) _PyMalloc_DebugCheckAddress(const void *p);
+ DL_IMPORT(void) _PyMalloc_DebugDumpStats(void);
  #define _PyMalloc_MALLOC _PyMalloc_DebugMalloc
  #define _PyMalloc_REALLOC _PyMalloc_DebugRealloc