more slab fixes, also introduced a new strategy optimized for medium sized buffers (64 >= x < 512) with lengths other than power of 2 (has an overhead of 2 words per buffer).

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20839 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Hugo Santos
2007-04-26 11:38:24 +00:00
parent b821eb28c8
commit e6fb3d3947
8 changed files with 192 additions and 66 deletions
+3 -3
View File
@@ -28,9 +28,9 @@ public:
void Free(Type *object) { BaseType::ReturnObject(object); }
private:
static void _ConstructObject(void *cookie, void *object)
static status_t _ConstructObject(void *cookie, void *object)
{
((TypedCache *)cookie)->ConstructObject((Type *)object);
return ((TypedCache *)cookie)->ConstructObject((Type *)object);
}
static void _DestructObject(void *cookie, void *object)
@@ -38,7 +38,7 @@ private:
((TypedCache *)cookie)->DestructObject((Type *)object);
}
virtual void ConstructObject(Type *object) {}
virtual status_t ConstructObject(Type *object) { return B_OK; }
virtual void DestructObject(Type *object) {}
};