mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-08 07:51:28 +12:00
vm: add "hook" memory (32G)
Implement overcommit emulation for shm.
This commit is contained in:
parent
e327d47169
commit
1b0b2fe21e
3 changed files with 48 additions and 8 deletions
|
@ -51,13 +51,16 @@ namespace utils
|
|||
#else
|
||||
int m_file{};
|
||||
#endif
|
||||
u32 m_size{};
|
||||
u32 m_flags{};
|
||||
u64 m_size{};
|
||||
atomic_t<void*> m_ptr{nullptr};
|
||||
|
||||
public:
|
||||
explicit shm(u32 size, u32 flags = 0);
|
||||
|
||||
// Construct with specified path as sparse file storage
|
||||
shm(u64 size, const std::string& storage);
|
||||
|
||||
shm(const shm&) = delete;
|
||||
|
||||
shm& operator=(const shm&) = delete;
|
||||
|
@ -91,7 +94,7 @@ namespace utils
|
|||
return static_cast<u8*>(+m_ptr);
|
||||
}
|
||||
|
||||
u32 size() const
|
||||
u64 size() const
|
||||
{
|
||||
return m_size;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue