1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/misc
Aaron Patterson 157095b3a4 Mark JIT code as writeable / executable depending on the situation
Some platforms don't want memory to be marked as writeable and
executable at the same time. When we write to the code block, we
calculate the OS page that the buffer position maps to.  Then we call
`mprotect` to allow writes on that particular page.  As an optimization,
we cache the "last written" aligned page which allows us to amortize the
cost of the `mprotect` call.  In other words, sequential writes to the
same page will only call `mprotect` on the page once.

When we're done writing, we call `mprotect` on the entire JIT buffer.
This means we don't need to keep track of which pages were marked as
writeable, we let the OS take care of that.

Co-authored-by: John Hawthorn <john@hawthorn.email>
2021-12-01 12:45:59 -08:00
..
expand_tabs.rb Promote net-smtp to the bundled gems 2021-05-27 14:42:11 +09:00
lldb_cruby.py Follow up the RString change [ci skip] 2021-10-28 08:58:59 +09:00
lldb_disasm.py Fix typos 2021-11-02 19:17:37 +09:00
lldb_yjit.py Add an lldb script to print YJIT comments 2021-10-20 18:19:37 -04:00
rb_optparse.bash [ruby/optparse] Add EditorConfig file 2021-04-28 11:56:15 +09:00
rb_optparse.zsh [ruby/optparse] Add EditorConfig file 2021-04-28 11:56:15 +09:00
README
ruby-style.el ruby-style.el: ruby-style-c-mode by VCS [ci skip] 2018-11-27 13:47:49 +00:00
test_lldb_cruby.rb Fix typo in lldb script 2019-04-02 21:13:22 +00:00
test_yjit_asm.sh Move the test file 2021-10-21 13:07:48 +09:00
yjit_asm_tests.c Mark JIT code as writeable / executable depending on the situation 2021-12-01 12:45:59 -08:00

README             this file
rb_optparse.bash   bash completion script
rb_optparse.zsh    zsh completion script
ruby-style.el      Ruby's C/C++ mode style for emacs
lldb_cruby.py      LLDB port of debug utility
test_lldb_cruby.rb test file for LLDB port