* The slab and the block cache now both also react on address space shortages.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34310 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
b8a73945cf
commit
1db31d4dbd
3
src/system/kernel/cache/block_cache.cpp
vendored
3
src/system/kernel/cache/block_cache.cpp
vendored
@ -973,7 +973,8 @@ block_cache::Init()
|
||||
return B_NO_MEMORY;
|
||||
|
||||
return register_low_resource_handler(&_LowMemoryHandler, this,
|
||||
B_KERNEL_RESOURCE_PAGES | B_KERNEL_RESOURCE_MEMORY, 0);
|
||||
B_KERNEL_RESOURCE_PAGES | B_KERNEL_RESOURCE_MEMORY
|
||||
| B_KERNEL_RESOURCE_ADDRESS_SPACE, 0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -678,7 +678,8 @@ object_cache_init(object_cache *cache, const char *name, size_t objectSize,
|
||||
}
|
||||
|
||||
register_low_resource_handler(object_cache_low_memory, cache,
|
||||
B_KERNEL_RESOURCE_PAGES | B_KERNEL_RESOURCE_MEMORY, 5);
|
||||
B_KERNEL_RESOURCE_PAGES | B_KERNEL_RESOURCE_MEMORY
|
||||
| B_KERNEL_RESOURCE_ADDRESS_SPACE, 5);
|
||||
|
||||
MutexLocker _(sObjectCacheListLock);
|
||||
sObjectCaches.Add(cache);
|
||||
|
Loading…
Reference in New Issue
Block a user