* 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:
Axel Dörfler 2009-11-27 13:04:30 +00:00
parent b8a73945cf
commit 1db31d4dbd
2 changed files with 4 additions and 2 deletions

View File

@ -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);
}

View File

@ -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);