From 9607eef9d6ebfe7da74737db34b193103a69d64c Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Mon, 25 May 2015 10:28:36 -0700 Subject: [PATCH] Fixing page alloc in range; only happens right before OOM crash though :/ --- src/xenia/memory.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xenia/memory.cc b/src/xenia/memory.cc index 3eb176e31..ec3a9a47c 100644 --- a/src/xenia/memory.cc +++ b/src/xenia/memory.cc @@ -639,7 +639,7 @@ bool BaseHeap::AllocRange(uint32_t low_address, uint32_t high_address, uint32_t high_page_number = (high_address - heap_base_) / page_size_; low_page_number = std::min(uint32_t(page_table_.size()) - 1, low_page_number); high_page_number = - std::min(uint32_t(page_table_.size()) - 1, high_page_number); + std::min(uint32_t(page_table_.size()) - 1, high_page_number) - page_count; std::lock_guard lock(heap_mutex_);