From 4db94473ec5095538b250a2c1f0f75a2f85e9b60 Mon Sep 17 00:00:00 2001 From: DrChat Date: Sat, 10 Feb 2018 16:45:06 -0600 Subject: [PATCH] [Core] Memory::GetPhysicalHeap --- src/xenia/memory.cc | 2 ++ src/xenia/memory.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/xenia/memory.cc b/src/xenia/memory.cc index 5461f027a..221f97362 100644 --- a/src/xenia/memory.cc +++ b/src/xenia/memory.cc @@ -337,6 +337,8 @@ BaseHeap* Memory::LookupHeapByType(bool physical, uint32_t page_size) { } } +VirtualHeap* Memory::GetPhysicalHeap() { return &heaps_.physical; } + void Memory::Zero(uint32_t address, uint32_t size) { std::memset(TranslateVirtual(address), 0, size); } diff --git a/src/xenia/memory.h b/src/xenia/memory.h index 7ca057a1d..74f5f9568 100644 --- a/src/xenia/memory.h +++ b/src/xenia/memory.h @@ -332,6 +332,9 @@ class Memory { // Gets the heap with the given properties. BaseHeap* LookupHeapByType(bool physical, uint32_t page_size); + // Gets the physical base heap. + VirtualHeap* GetPhysicalHeap(); + // Dumps a map of all allocated memory to the log. void DumpMap();