headers/bsd: Add sys/queue.h.
[haiku.git] / src / system / kernel / slab / SmallObjectCache.h
blob2d19a82d622eb4229ae5640833e34aed3a1ead8c
1 /*
2 * Copyright 2008, Axel Dörfler. All Rights Reserved.
3 * Copyright 2007, Hugo Santos. All Rights Reserved.
5 * Distributed under the terms of the MIT License.
6 */
7 #ifndef SMALL_OBJECT_CACHE_H
8 #define SMALL_OBJECT_CACHE_H
11 #include "ObjectCache.h"
14 struct SmallObjectCache : ObjectCache {
15 static SmallObjectCache* Create(const char* name, size_t object_size,
16 size_t alignment, size_t maximum,
17 size_t magazineCapacity,
18 size_t maxMagazineCount,
19 uint32 flags, void* cookie,
20 object_cache_constructor constructor,
21 object_cache_destructor destructor,
22 object_cache_reclaimer reclaimer);
23 virtual void Delete();
25 virtual slab* CreateSlab(uint32 flags);
26 virtual void ReturnSlab(slab* slab, uint32 flags);
27 virtual slab* ObjectSlab(void* object) const;
31 #endif // SMALL_OBJECT_CACHE_H