Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在做一些简单的 JITing,并在 Windows 下使用VirtualProtectEx将页面标记为可执行。在 Linux 下,最好是在其他类似 POSIX/Unix 的操作系统下有什么等价物?
您正在寻找mprotect并且可能还在寻找mmap。请注意,与 Windows 不同,进程 A 无法更改进程 B 的内存映射(缺少ptrace的可怕技巧)。