-// 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 <g0dil@berlios.de>
//
// This program is free software; you can redistribute it and/or modify
//#include "pool_alloc_mixin.ih"
// Custom includes
-#include <boost/assert.hpp>
+#include "../Utils/senfassert.hh"
#define prefix_ inline
///////////////////////////////cti.p///////////////////////////////////////
{
// 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();
template <class Self>
prefix_ void senf::pool_alloc_mixin<Self>::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 <class Self>
prefix_ unsigned long senf::pool_alloc_mixin<Self>::allocCounter()
// c-file-style: "senf"
// indent-tabs-mode: nil
// ispell-local-dictionary: "american"
+// compile-command: "scons -u test"
+// comment-column: 40
// End: