]> rtime.felk.cvut.cz Git - l4.git/blobdiff - kernel/fiasco/src/lib/libk/slab_cache_anon.cpp
update
[l4.git] / kernel / fiasco / src / lib / libk / slab_cache_anon.cpp
index 30fce0cdec505e7fd702ca8d275042ee6e9d9e13..e7d75f956073d00c325ec02ed9f8a297ace8b0f2 100644 (file)
@@ -156,21 +156,6 @@ slab::slab(slab_cache_anon *cache)
   _data._free = elem_num;
 }
 
-PUBLIC
-inline 
-slab::~slab()
-{
-  assert(_data._in_use == 0);
-
-  slab_entry *e = _data._first_free;
-
-  while (e)
-    {
-      _data._cache->elem_dtor(& e->_entry[0]);
-      e = e->_next_free;
-    }
-}
-
 PUBLIC
 void *
 slab::alloc()
@@ -346,13 +331,14 @@ virtual
 slab_cache_anon::~slab_cache_anon()
 {
   // the derived class should call destroy() before deleting us.
-  assert(_first_slab == 0);
+  // assert(_first_slab == 0);
 }
 
-PROTECTED
-void 
+PROTECTED inline
+void
 slab_cache_anon::destroy()     // descendant should call this in destructor
 {
+#if 0
   slab *n, *s = _first_slab;
 
   while (s)
@@ -367,6 +353,7 @@ slab_cache_anon::destroy()  // descendant should call this in destructor
     }
 
   _first_slab = 0;
+#endif
 }
 
 PUBLIC