mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-06 06:55:09 +00:00
vm: fix mapping of file's last page
thanks @red_prig for investigation
This commit is contained in:
parent
ea2915467a
commit
e6022c1c4c
6 changed files with 136 additions and 69 deletions
13
rx/include/rx/mem.hpp
Normal file
13
rx/include/rx/mem.hpp
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#pragma once
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
namespace rx::mem {
|
||||
extern const std::size_t pageSize;
|
||||
void *map(void *address, std::size_t size, int prot, int flags, int fd = -1,
|
||||
std::ptrdiff_t offset = 0);
|
||||
void *reserve(std::size_t size);
|
||||
bool reserve(void *address, std::size_t size);
|
||||
bool protect(void *address, std::size_t size, int prot);
|
||||
bool unmap(void *address, std::size_t size);
|
||||
} // namespace rx::mem
|
||||
Loading…
Add table
Add a link
Reference in a new issue