From 1db31d4dbddb1f0af6c41f8f12da95f1b4439d67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Fri, 27 Nov 2009 13:04:30 +0000 Subject: [PATCH] * 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 --- src/system/kernel/cache/block_cache.cpp | 3 ++- src/system/kernel/slab/Slab.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/system/kernel/cache/block_cache.cpp b/src/system/kernel/cache/block_cache.cpp index d7ff992c9f..ea74accfbf 100644 --- a/src/system/kernel/cache/block_cache.cpp +++ b/src/system/kernel/cache/block_cache.cpp @@ -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); } diff --git a/src/system/kernel/slab/Slab.cpp b/src/system/kernel/slab/Slab.cpp index bf69b39145..c14a44631a 100644 --- a/src/system/kernel/slab/Slab.cpp +++ b/src/system/kernel/slab/Slab.cpp @@ -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);