MCPcopy Create free account
hub / github.com/citron-neo/emulator / IsValidVirtualAddressRange

Method IsValidVirtualAddressRange

src/core/memory.cpp:923–930  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

921 const auto [pointer, type] = page_table.entries[page].pointer.PointerType();
922 return pointer != 0 || type == Common::PageType::RasterizerCachedMemory ||
923 type == Common::PageType::DebugMemory;
924}
925
926bool Memory::IsValidVirtualAddressRange(Common::ProcessAddress base, u64 size) const {
927 Common::ProcessAddress end = base + size;
928 Common::ProcessAddress page = Common::AlignDown(GetInteger(base), CITRON_PAGESIZE);
929 for (; page < end; page += CITRON_PAGESIZE)
930 if (!IsValidVirtualAddress(page))
931 return false;
932 return true;
933}

Callers 9

GetAArch64BacktraceFunction · 0.80
GetAArch32BacktraceFunction · 0.80
MemoryReadCodeMethod · 0.80
CheckMemoryAccessMethod · 0.80
MemoryReadCodeMethod · 0.80
CheckMemoryAccessMethod · 0.80
DoSearchMethod · 0.80

Calls 2

AlignDownFunction · 0.85
GetIntegerFunction · 0.85

Tested by

no test coverage detected