// otherwise someone did CAS before you, so try again (the return
// value is the old value you will pass next time.)
-static inline void poolfree( MemPool* p, void* ptr ) {
+static inline void poolfreeinto( MemPool* p, void* ptr ) {
MemPoolItem* tailCurrent;
MemPoolItem* tailActual;
}
+static void pooldestroy( MemPool* p ) {
+ MemPoolItem* i = p->head;
+ MemPoolItem* n;
+
+ while( i != NULL ) {
+ n = i->next;
+ free( i );
+ i = n;
+ }
+
+ free( p );
+}
+
+
#endif // ___MEMPOOL_H__