[PATCH] D131768: [Orc] Properly deallocate mapped memory in MapperJITLinkMemoryManager
Anubhab Ghosh via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 12 06:23:28 PDT 2022
argentite created this revision.
Herald added a subscriber: hiraditya.
Herald added a project: All.
argentite added reviewers: lhames, sgraenitz.
argentite published this revision for review.
argentite added a comment.
Herald added subscribers: llvm-commits, StephenFan.
Herald added a project: LLVM.
We are resetting permissions to read/write in `InProcessMapper::deinitialize()`. It may make sense to set them to read/write in `InProcessMapper::prepare()` instead. But in that case extra syscalls are made during startup instead of shutdown.
When memory is deallocated from MapperJITLinkMemoryManager deinitialize
actions are run through mapper and in case of InProcessMapper, memory
protections of the region are reset to read/write as they were previously
changed and can be reused in future.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D131768
Files:
llvm/include/llvm/ExecutionEngine/Orc/MemoryMapper.h
llvm/lib/ExecutionEngine/Orc/MapperJITLinkMemoryManager.cpp
llvm/lib/ExecutionEngine/Orc/MemoryMapper.cpp
llvm/unittests/ExecutionEngine/Orc/MapperJITLinkMemoryManagerTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131768.452160.patch
Type: text/x-patch
Size: 4344 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220812/2553701e/attachment.bin>
More information about the llvm-commits
mailing list