Memory cleanup, page flags implemented

RSXCMDMem, SPRXMem, MmaperMem removed
MainMem range fixed
This commit is contained in:
Nekotekina 2015-02-13 17:04:03 +03:00
parent 0eebfb0aaa
commit 267de68441
23 changed files with 259 additions and 260 deletions

View file

@ -22,8 +22,6 @@ struct MemInfo
struct MemBlockInfo : public MemInfo
{
void *mem;
MemBlockInfo(u32 addr, u32 size);
void Free();
@ -32,27 +30,26 @@ struct MemBlockInfo : public MemInfo
MemBlockInfo(MemBlockInfo &&other)
: MemInfo(other.addr,other.size)
, mem(other.mem)
{
other.mem = nullptr;
other.addr = 0;
other.size = 0;
}
MemBlockInfo& operator =(MemBlockInfo &other) = delete;
MemBlockInfo& operator =(MemBlockInfo &&other)
{
this->Free();
Free();
this->addr = other.addr;
this->size = other.size;
this->mem = other.mem;
other.mem = nullptr;
other.addr = 0;
other.size = 0;
return *this;
}
~MemBlockInfo()
{
Free();
mem = nullptr;
}
};
@ -76,7 +73,6 @@ struct VirtualMemInfo : public MemInfo
class MemoryBlock
{
protected:
u8* mem;
u32 range_start;
u32 range_size;