Make vm::get_super_ptr return contiguous memory

Cleanup RSX code complexity
This commit is contained in:
Nekotekina 2018-09-27 23:04:10 +03:00
parent 72ba062b1a
commit da6ce80f4f
13 changed files with 28 additions and 395 deletions

View file

@ -46,7 +46,6 @@ namespace utils
int m_file;
#endif
u32 m_size;
u8* m_ptr;
public:
explicit shm(u32 size);
@ -69,17 +68,6 @@ namespace utils
// Unmap shared memory, undoing map_critical
void unmap_critical(void* ptr);
// Access memory with simple range check
u8* get(u32 offset, u32 size) const
{
if (offset >= m_size || m_size - offset < size)
{
return nullptr;
}
return m_ptr + offset;
}
u32 size() const
{
return m_size;