X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2Fpool_alloc_mixin.cti;h=e2a80abdd28e45c7d6615b8c067b6509c325fa9f;hb=412024ed31a4ab4eaea7a4165a434f8efebee325;hp=8bb0eef5096c77c03d4469b52f8644ce334438b2;hpb=3d5b1045dc2531f239a3af4a8f3b17b1fe31549c;p=senf.git diff --git a/Utils/pool_alloc_mixin.cti b/Utils/pool_alloc_mixin.cti index 8bb0eef..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,16 +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) { - // 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 +#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()