NEW FILE HEADER / COPYRIGHT FORMAT
[senf.git] / Utils / pool_alloc_mixin.cti
index 6139961..ce477d4 100644 (file)
@@ -1,6 +1,8 @@
+// $Id$
+//
 // Copyright (C) 2007 
-// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
-// Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
+// 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
@@ -34,7 +36,7 @@ prefix_ void * senf::pool_alloc_mixin<Self>::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) );
+    BOOST_ASSERT( size <= sizeof(Self) );
 #ifndef NDEBUG
     allocCounter(1);
 #endif
@@ -44,9 +46,6 @@ prefix_ void * senf::pool_alloc_mixin<Self>::operator new(size_t size)
 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
     allocCounter(-1);
 #endif
@@ -81,4 +80,6 @@ prefix_ unsigned long senf::pool_alloc_mixin<Self>::allocCounter(long delta)
 // c-file-style: "senf"
 // indent-tabs-mode: nil
 // ispell-local-dictionary: "american"
+// compile-command: "scons -u test"
+// comment-column: 40
 // End: