X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2Fpool_alloc_mixin.cti;h=e2a80abdd28e45c7d6615b8c067b6509c325fa9f;hb=412024ed31a4ab4eaea7a4165a434f8efebee325;hp=ce477d4636442174dca7fdebc2c1f5aa9eaca83f;hpb=f73fa16ed5abdce272ac77f8b8b9ef2b9922c266;p=senf.git diff --git a/Utils/pool_alloc_mixin.cti b/Utils/pool_alloc_mixin.cti index ce477d4..e2a80ab 100644 --- a/Utils/pool_alloc_mixin.cti +++ b/Utils/pool_alloc_mixin.cti @@ -1,8 +1,8 @@ // $Id$ // -// Copyright (C) 2007 -// Fraunhofer Institute for Open Communication Systems (FOKUS) -// Competence Center NETwork research (NET), St. Augustin, GERMANY +// Copyright (C) 2007 +// Fraunhofer Institute for Open Communication Systems (FOKUS) +// Competence Center NETwork research (NET), St. Augustin, GERMANY // Stefan Bund // // This program is free software; you can redistribute it and/or modify @@ -26,7 +26,7 @@ //#include "pool_alloc_mixin.ih" // Custom includes -#include +#include "../Utils/senfassert.hh" #define prefix_ inline ///////////////////////////////cti.p/////////////////////////////////////// @@ -36,8 +36,8 @@ prefix_ void * senf::pool_alloc_mixin::operator new(size_t size) { // When deriving from Self you may not change the class's size without // inheriting from pool_alloc_mixin again. See pool_alloc_mixin documentation. - BOOST_ASSERT( size <= sizeof(Self) ); -#ifndef NDEBUG + SENF_ASSERT( size <= sizeof(Self) ); +#ifdef SENF_DEBUG allocCounter(1); #endif return boost::singleton_pool< pool_alloc_mixin_tag, sizeof(Self) >::malloc(); @@ -46,13 +46,13 @@ prefix_ void * senf::pool_alloc_mixin::operator new(size_t size) template prefix_ void senf::pool_alloc_mixin::operator delete(void * p, size_t size) { -#ifndef NDEBUG +#ifdef SENF_DEBUG allocCounter(-1); #endif boost::singleton_pool< pool_alloc_mixin_tag, sizeof(Self) >::free(p); } -#ifndef NDEBUG +#ifdef SENF_DEBUG template prefix_ unsigned long senf::pool_alloc_mixin::allocCounter()