Added object_cache_set_minimum_reserve() which sets the minimal number
of free objects an object cache should try to have ready. If the number of free objects drops below the threshold, a new urgent priority thread is asked to asynchronously resize the object cache (pretty similar to the heap grower thread). Such a mechanism is necessary for code paths that are supposed to free pages, but may need memory themselves (like the swap support). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27100 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -46,6 +46,9 @@ object_cache *create_object_cache_etc(const char *name, size_t object_size,
|
||||
|
||||
void delete_object_cache(object_cache *cache);
|
||||
|
||||
status_t object_cache_set_minimum_reserve(object_cache *cache,
|
||||
size_t objectCount);
|
||||
|
||||
void *object_cache_alloc(object_cache *cache, uint32 flags);
|
||||
void object_cache_free(object_cache *cache, void *object);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user