From fd6a68632ee4e509e47e3da4eb8dd6db38a852c0 Mon Sep 17 00:00:00 2001 From: "Matthias Huetsch [mhu]" Date: Wed, 16 Jun 2010 16:46:19 +0200 Subject: Added enclosing classname to FixedMemPool diagnosis. --- tools/source/memtools/mempool.cxx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'tools/source') diff --git a/tools/source/memtools/mempool.cxx b/tools/source/memtools/mempool.cxx index 45d6d2ea9367..185ba731b3a2 100644 --- a/tools/source/memtools/mempool.cxx +++ b/tools/source/memtools/mempool.cxx @@ -28,7 +28,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_tools.hxx" -#include +#include "tools/mempool.hxx" +#include "osl/diagnose.h" #include "rtl/alloc.h" #ifndef INCLUDED_STDIO_H @@ -42,11 +43,13 @@ *************************************************************************/ FixedMemPool::FixedMemPool ( - USHORT _nTypeSize, USHORT, USHORT) + char const * pTypeName, USHORT nTypeSize, USHORT, USHORT) + : m_pTypeName (pTypeName) { char name[RTL_CACHE_NAME_LENGTH + 1]; - snprintf (name, sizeof(name), "FixedMemPool_%d", (int)_nTypeSize); - m_pImpl = (FixedMemPool_Impl*)rtl_cache_create (name, _nTypeSize, 0, NULL, NULL, NULL, 0, NULL, 0); + snprintf (name, sizeof(name), "FixedMemPool_%d", (int)nTypeSize); + m_pImpl = (FixedMemPool_Impl*)rtl_cache_create (name, nTypeSize, 0, NULL, NULL, NULL, 0, NULL, 0); + OSL_TRACE("FixedMemPool::ctor(\"%s\"): %p", m_pTypeName, m_pImpl); } /************************************************************************* @@ -57,7 +60,8 @@ FixedMemPool::FixedMemPool ( FixedMemPool::~FixedMemPool() { - rtl_cache_destroy ((rtl_cache_type*)(m_pImpl)); + OSL_TRACE("FixedMemPool::dtor(\"%s\"): %p", m_pTypeName, m_pImpl); + rtl_cache_destroy ((rtl_cache_type*)(m_pImpl)), m_pImpl = 0; } /************************************************************************* -- cgit