memory Save/Restore

This commit is contained in:
Dr. Chat
2015-12-01 17:26:55 -06:00
committed by Ben Vanik
parent aa7919bd89
commit 432e32f7c2
2 changed files with 120 additions and 0 deletions

View File

@@ -19,6 +19,10 @@
#include "xenia/base/mutex.h"
#include "xenia/cpu/mmio_handler.h"
namespace xe {
class ByteStream;
} // namespace xe
namespace xe {
enum SystemHeapFlag : uint32_t {
@@ -144,6 +148,11 @@ class BaseHeap {
// This is only valid if the page is backed by a physical allocation.
uint32_t GetPhysicalAddress(uint32_t address);
bool Save(ByteStream* stream);
bool Restore(ByteStream* stream);
void Reset();
protected:
BaseHeap();
@@ -320,6 +329,11 @@ class Memory {
// Dumps a map of all allocated memory to the log.
void DumpMap();
bool Save(ByteStream* stream);
bool Restore(ByteStream* stream);
void Reset();
private:
int MapViews(uint8_t* mapping_base);
void UnmapViews();