Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Memory protection games just don't scale. You're modifying global structures, resulting in tons of contention. That's also why compacting GCs prefer to use card marking rather than mprotect.

I’m describing what production JVMs do. They do it because it’s a speedup for them. Like, those compacting GCs that you’re saying use card marking are using page faults for safe points more often than not.

It’s true that page protection games don’t result in speedups for generational store barriers. A safe point is not that.



I believe, Oracle JVM uses polling?

This is the class responsible for safepoints: https://github.com/openjdk/jdk/blob/4b544f93ad0e2beae4c80e06...

And this is one of the implementations: https://github.com/openjdk/jdk/blob/4b544f93ad0e2beae4c80e06...

The arming code: https://github.com/openjdk/jdk/blob/4b544f93ad0e2beae4c80e06...

I might be missing something, but I'd be terribly surprised if VM games are worth it.


That JVM totally uses the page protection trick.

Look at the code that talks about polling page.


D'oh. I don't know how I missed it. It's right there around the line 69. Nice.

Well, I'm definitely surprised it works.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: