REBASE: Fixing Memory::Reset().
This commit is contained in:
parent
432e32f7c2
commit
bbff23a8bb
|
@ -272,7 +272,11 @@ void Memory::UnmapViews() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Memory::Reset() {
|
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) {
|
BaseHeap* Memory::LookupHeap(uint32_t address) {
|
||||||
|
@ -458,14 +462,6 @@ bool Memory::Restore(ByteStream* stream) {
|
||||||
return true;
|
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) {
|
xe::memory::PageAccess ToPageAccess(uint32_t protect) {
|
||||||
if ((protect & kMemoryProtectRead) && !(protect & kMemoryProtectWrite)) {
|
if ((protect & kMemoryProtectRead) && !(protect & kMemoryProtectWrite)) {
|
||||||
return xe::memory::PageAccess::kReadOnly;
|
return xe::memory::PageAccess::kReadOnly;
|
||||||
|
|
|
@ -332,8 +332,6 @@ class Memory {
|
||||||
bool Save(ByteStream* stream);
|
bool Save(ByteStream* stream);
|
||||||
bool Restore(ByteStream* stream);
|
bool Restore(ByteStream* stream);
|
||||||
|
|
||||||
void Reset();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int MapViews(uint8_t* mapping_base);
|
int MapViews(uint8_t* mapping_base);
|
||||||
void UnmapViews();
|
void UnmapViews();
|
||||||
|
|
Loading…
Reference in New Issue