mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-02 13:01:27 +12:00
Improve low-level mmap utilities (Linux/BSD)
Add madvise (MADV_WILLNEED) on utils::memory_commit Add madvise (MADV_FREE or MADV_DONTNEED) on utils::memory_decommit Improve shm_open pseudo-random name (not used on Linux)
This commit is contained in:
parent
ba5ed5f380
commit
b66628baca
2 changed files with 19 additions and 5 deletions
|
@ -88,9 +88,7 @@ static u8* add_jit_memory(std::size_t size, uint align)
|
|||
|
||||
if (olda != newa) [[unlikely]]
|
||||
{
|
||||
#ifdef CAN_OVERCOMMIT
|
||||
madvise(pointer + olda, newa - olda, MADV_WILLNEED);
|
||||
#else
|
||||
#ifndef CAN_OVERCOMMIT
|
||||
// Commit more memory
|
||||
utils::memory_commit(pointer + olda, newa - olda, Prot);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue