REBASE: Fixing Memory::Reset().

This commit is contained in:
Ben Vanik 2015-12-29 12:45:27 -08:00
parent 432e32f7c2
commit bbff23a8bb
2 changed files with 5 additions and 11 deletions

View File

@ -272,7 +272,11 @@ void Memory::UnmapViews() {
}
void Memory::Reset() {
// TODO(benvanik): zero memory, free all heap page tables, etc.
heaps_.v00000000.Reset();
heaps_.v40000000.Reset();
heaps_.v80000000.Reset();
heaps_.v90000000.Reset();
heaps_.physical.Reset();
}
BaseHeap* Memory::LookupHeap(uint32_t address) {
@ -458,14 +462,6 @@ bool Memory::Restore(ByteStream* stream) {
return true;
}
void Memory::Reset() {
heaps_.v00000000.Reset();
heaps_.v40000000.Reset();
heaps_.v80000000.Reset();
heaps_.v90000000.Reset();
heaps_.physical.Reset();
}
xe::memory::PageAccess ToPageAccess(uint32_t protect) {
if ((protect & kMemoryProtectRead) && !(protect & kMemoryProtectWrite)) {
return xe::memory::PageAccess::kReadOnly;

View File

@ -332,8 +332,6 @@ class Memory {
bool Save(ByteStream* stream);
bool Restore(ByteStream* stream);
void Reset();
private:
int MapViews(uint8_t* mapping_base);
void UnmapViews();