mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-28 13:28:01 +03:00
JIT: increase likeliness of allocating 2M large pages
On top of enabled transparent hugepages hint (Linux).
This commit is contained in:
parent
95b8467a76
commit
ca9898e838
1 changed files with 3 additions and 3 deletions
|
@ -69,7 +69,7 @@ static u8* add_jit_memory(std::size_t size, uint align)
|
||||||
// Check the necessity to commit more memory
|
// Check the necessity to commit more memory
|
||||||
if (_new > olda) [[unlikely]]
|
if (_new > olda) [[unlikely]]
|
||||||
{
|
{
|
||||||
newa = ::align(_new, 0x100000);
|
newa = ::align(_new, 0x200000);
|
||||||
}
|
}
|
||||||
|
|
||||||
ctr += _new - (ctr & 0xffff'ffff);
|
ctr += _new - (ctr & 0xffff'ffff);
|
||||||
|
@ -310,8 +310,8 @@ struct MemoryManager1 : llvm::RTDyldMemoryManager
|
||||||
// 256 MiB for code or data
|
// 256 MiB for code or data
|
||||||
static constexpr u64 c_max_size = 0x20000000 / 2;
|
static constexpr u64 c_max_size = 0x20000000 / 2;
|
||||||
|
|
||||||
// Allocation unit
|
// Allocation unit (2M)
|
||||||
static constexpr u64 c_page_size = 4096;
|
static constexpr u64 c_page_size = 2 * 1024 * 1024;
|
||||||
|
|
||||||
// Reserve 512 MiB
|
// Reserve 512 MiB
|
||||||
u8* const ptr = static_cast<u8*>(utils::memory_reserve(c_max_size * 2));
|
u8* const ptr = static_cast<u8*>(utils::memory_reserve(c_max_size * 2));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue