3 ms·
So, this note says that browser JITs are the main thing that typically needs writable and executable memory right now, and the author (Ted Unangst) is going to
by schoen 12y ago
So, this note says that browser JITs are the main thing that typically needs writable and executable memory right now, and the author (Ted Unangst) is going to try to fix that.
It seems natural to think that JITs would want that feature (so they can compile things into native code and then jump into it). Can someone who has worked with DOM rendering or Javscript interpreters opine on whether it's plausible to get rid of the use of write+execute memory segments without sacrificing a lot of performance?
- azakai 12y agoOn Firefox and WebKit (but not Chrome) you can already do that, by disabling the JIT and thereby only running in the interpreter. You do lose a large amount of speed on sites that have JS doing heavy things. However, on a lot of the web, you don't need heavy JS, so you might not notice it on a news site or your email site. Try to play a game, though, and it'll be obvious.
- justincormack 12y agoNo the idea is you set memory to write permission only, write out the jitted code, and switch the memory to execute, no write before you execute it. It simply means more calls to change memory protection, which is on page size granularity so may mean using a whole page for each jitted fragment.