mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-12 01:38:37 +12:00
Make vm::get_super_ptr return contiguous memory
Cleanup RSX code complexity
This commit is contained in:
parent
72ba062b1a
commit
da6ce80f4f
13 changed files with 28 additions and 395 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue