mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-26 13:52:21 +00:00
kern: if a page table region is zero-size, nothing overlaps it
This commit is contained in:
parent
85f9355184
commit
6e4664ee05
1 changed files with 4 additions and 4 deletions
|
@ -426,8 +426,8 @@ namespace ams::kern {
|
||||||
const size_t region_size = this->GetRegionSize(state);
|
const size_t region_size = this->GetRegionSize(state);
|
||||||
|
|
||||||
const bool is_in_region = region_start <= addr && addr < end && last <= region_start + region_size - 1;
|
const bool is_in_region = region_start <= addr && addr < end && last <= region_start + region_size - 1;
|
||||||
const bool is_in_heap = !(end <= m_heap_region_start || m_heap_region_end <= addr);
|
const bool is_in_heap = !(end <= m_heap_region_start || m_heap_region_end <= addr || m_heap_region_start == m_heap_region_end);
|
||||||
const bool is_in_alias = !(end <= m_alias_region_start || m_alias_region_end <= addr);
|
const bool is_in_alias = !(end <= m_alias_region_start || m_alias_region_end <= addr || m_alias_region_start == m_alias_region_end);
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case KMemoryState_Free:
|
case KMemoryState_Free:
|
||||||
case KMemoryState_Kernel:
|
case KMemoryState_Kernel:
|
||||||
|
|
Loading…
Reference in a new issue