Don't always commit memory in VMAnonymousCache::Fault() for

overcommitting caches. If the page in question was just not mapped or
swapped out, we would increase the committment unnecessarily
(potentially even beyond the size of the cache).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27229 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2008-08-29 00:49:09 +00:00
parent ae21ddaf58
commit d277d9f2f8
+1 -1
View File
@@ -697,7 +697,7 @@ VMAnonymousCache::WriteAsync(off_t offset, const iovec* vecs, size_t count,
status_t
VMAnonymousCache::Fault(struct vm_address_space *aspace, off_t offset)
{
if (fCanOvercommit) {
if (fCanOvercommit && LookupPage(offset) == NULL && !HasPage(offset)) {
if (fGuardedSize > 0) {
uint32 guardOffset;