MacOS: Do not leak MAP_JIT on utils::memory_decommit
This commit is contained in:
@@ -316,10 +316,10 @@ void jit_runtime::finalize() noexcept
|
||||
#endif
|
||||
// Reset JIT memory
|
||||
#ifdef CAN_OVERCOMMIT
|
||||
utils::memory_reset(get_jit_memory(), 0x80000000);
|
||||
utils::memory_reset(get_jit_memory(), 0x80000000, true);
|
||||
utils::memory_protect(get_jit_memory(), 0x40000000, utils::protection::wx);
|
||||
#else
|
||||
utils::memory_decommit(get_jit_memory(), 0x80000000);
|
||||
utils::memory_decommit(get_jit_memory(), 0x80000000, true);
|
||||
#endif
|
||||
|
||||
s_code_pos = 0;
|
||||
|
||||
@@ -260,7 +260,7 @@ struct MemoryManager1 : llvm::RTDyldMemoryManager
|
||||
// utils::memory_decommit(m_code_mems, how_much(code_ptr));
|
||||
// utils::memory_decommit(m_data_ro_mems, how_much(data_ro_ptr));
|
||||
// utils::memory_decommit(m_data_rw_mems, how_much(data_rw_ptr));
|
||||
utils::memory_decommit(m_code_mems, c_max_size * 3);
|
||||
utils::memory_decommit(m_code_mems, c_max_size * 3, true);
|
||||
}
|
||||
|
||||
llvm::JITSymbol findSymbol(const std::string& name) override
|
||||
|
||||
Reference in New Issue
Block a user