From d3a0cee977bd3c2cb3e0993ed418429a4f8e8a9b Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Wed, 11 Oct 2000 22:35:35 +0000 Subject: [PATCH] added additional debug output --- src/libCom/cxxTemplates/tsFreeList.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/libCom/cxxTemplates/tsFreeList.h b/src/libCom/cxxTemplates/tsFreeList.h index 5907778fa..f1b67061a 100644 --- a/src/libCom/cxxTemplates/tsFreeList.h +++ b/src/libCom/cxxTemplates/tsFreeList.h @@ -39,6 +39,9 @@ #include #include "osiMutex.h" +// these versions of the microsoft compiler incorrectly +// warn about a missing delete operator if only the +// preferred delete operator with a size argument is present #if defined ( _MSC_VER ) && _MSC_VER <= 1200 # pragma warning ( disable : 4291 ) #endif @@ -127,6 +130,12 @@ inline void * tsFreeList < T, N, DEBUG_LEVEL >::allocate ( size_t size ) template < class T, unsigned N, unsigned DEBUG_LEVEL > tsFreeListItem < T, DEBUG_LEVEL > * tsFreeList < T, N, DEBUG_LEVEL >::allocateFromNewChunk () { + if ( DEBUG_LEVEL > 0 ) { + fprintf ( stderr, "allocating a %s of size %u\n", + typeid ( tsFreeListChunk < T, N, DEBUG_LEVEL > ).name (), + sizeof ( tsFreeListChunk < T, N, DEBUG_LEVEL > ) ); + } + tsFreeListChunk < T, N, DEBUG_LEVEL > *pChunk = new ( tsFreeListChunk < T, N, DEBUG_LEVEL > ); if ( ! pChunk) { return 0;