some object cache / slab improvements.

- call the reclaimer callback when low on memory.
 - use the depot when on multi-cpu setups (for scalability).
 - fixed the amount of memory spent on slabs for very large objects.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20889 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Hugo Santos
2007-04-28 21:35:23 +00:00
parent 2842773aa5
commit 6e31ae98f9
3 changed files with 134 additions and 74 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ typedef struct object_cache object_cache;
typedef status_t (*object_cache_constructor)(void *cookie, void *object);
typedef void (*object_cache_destructor)(void *cookie, void *object);
typedef void (*object_cache_reclaimer)(void *cookie, void *object);
typedef void (*object_cache_reclaimer)(void *cookie, int32 level);
object_cache *create_object_cache(const char *name, size_t object_size,
size_t alignment, void *cookie, object_cache_constructor constructor,