mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-04 14:08:37 +00:00
Implement utils::memory_map_fd (partial)
Improve JIT profiling dump format (data + name, mmap) Improve objdump interception util (better speed, fix bugs) Rename spu_ubertrampoline to __ub+number
This commit is contained in:
parent
ffe00e8619
commit
dba2baba9c
5 changed files with 139 additions and 68 deletions
|
|
@ -296,6 +296,23 @@ namespace utils
|
|||
#endif
|
||||
}
|
||||
|
||||
void* memory_map_fd(native_handle fd, usz size, protection prot)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
// TODO
|
||||
return nullptr;
|
||||
#else
|
||||
const auto result = ::mmap(nullptr, size, +prot, MAP_SHARED, fd, 0);
|
||||
|
||||
if (result == reinterpret_cast<void*>(uptr{umax}))
|
||||
{
|
||||
[[unlikely]] return nullptr;
|
||||
}
|
||||
|
||||
return result;
|
||||
#endif
|
||||
}
|
||||
|
||||
shm::shm(u32 size, u32 flags)
|
||||
: m_flags(flags)
|
||||
, m_size(utils::align(size, 0x10000))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue