On Thu, 11 Nov 2021 16:31:41 GMT, Andrew Dinn <ad...@openjdk.org> wrote:

> > Am I right is saying that for Macos, all generated code is remapped RO 
> > before execution?
> 
> Ah, no, it seems the code cache is not RWX all the time as far as Java 
> threads are concerned. The Macos/AArch64 code is strategically calling 
> pthread_jit_write_protect_np at Java <-> JVM transition points.

And this requires magic kernel support. I did mention it to a kernel engineer 
who wasn't very impressed, but I think it's pretty cool.

-------------

PR: https://git.openjdk.java.net/jdk/pull/6334

Reply via email to