mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-02 13:01:27 +12:00
Enable ASLR
This commit is contained in:
parent
68e7f4e820
commit
e2df71d87c
8 changed files with 84 additions and 69 deletions
|
@ -344,15 +344,7 @@ jit_runtime_base& asmjit::get_global_runtime()
|
|||
{
|
||||
custom_runtime() noexcept
|
||||
{
|
||||
// Search starting in first 2 GiB of memory
|
||||
for (u64 addr = size;; addr += size)
|
||||
{
|
||||
if (auto ptr = utils::memory_reserve(size, reinterpret_cast<void*>(addr)))
|
||||
{
|
||||
m_pos.raw() = static_cast<uchar*>(ptr);
|
||||
break;
|
||||
}
|
||||
}
|
||||
ensure(m_pos.raw() = static_cast<uchar*>(utils::memory_reserve(size)));
|
||||
|
||||
// Initialize "end" pointer
|
||||
m_max = m_pos + size;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue