Fixing page alloc in range; only happens right before OOM crash though :/

This commit is contained in:
Ben Vanik 2015-05-25 10:28:36 -07:00
parent ddbab82169
commit 9607eef9d6
1 changed files with 1 additions and 1 deletions

View File

@ -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<xe::recursive_mutex> lock(heap_mutex_);