X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2Fpool_alloc_mixin.cti;h=e2a80abdd28e45c7d6615b8c067b6509c325fa9f;hb=3863d46dd898b7bc35ea8c6ccd8563b18762a6b6;hp=3252ad09215d18a8d5304d8232616384b8d2ebe3;hpb=6bb3fa3caaa41dab4d5b451ca27e70f9e55e49d6;p=senf.git diff --git a/Utils/pool_alloc_mixin.cti b/Utils/pool_alloc_mixin.cti index 3252ad0..e2a80ab 100644 --- a/Utils/pool_alloc_mixin.cti +++ b/Utils/pool_alloc_mixin.cti @@ -1,6 +1,8 @@ -// Copyright (C) 2007 -// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) -// Kompetenzzentrum fuer Satelitenkommunikation (SatCom) +// $Id$ +// +// 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 @@ -24,7 +26,7 @@ //#include "pool_alloc_mixin.ih" // Custom includes -#include +#include "../Utils/senfassert.hh" #define prefix_ inline ///////////////////////////////cti.p/////////////////////////////////////// @@ -34,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(); @@ -44,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()