Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 953879
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T00:07:19+00:00 2026-05-16T00:07:19+00:00

"Consider a typical Windows x86 or AMD64 architecture, the memory is divided in executable

  • 0

"Consider a typical Windows x86 or
AMD64 architecture, the memory is
divided in executable sections that
cannot be written to and data sections
that can be written to but cannot be
executed (think DEP)."

"JIT compiles methods in-memory, does
(generally) not store anything to
disk, instead moves it around where
the next instruction pointer can reach
it, changes the current instruction
pointer (pointing to the JIT) to point
to the newly generated code and then
executes it."

These two paragraphs, while a bit over-simplified, are what I basically understand of JIT and Windows’ memory model. I also know that when I try to copy some executable code in memory by hand and try to execute it, I will generally be unable to do it (unless with DLL injection).

How did the JIT-designers overcome this hurdle? Do they use a ring-0 driver or is everything done in user mode?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T00:07:20+00:00Added an answer on May 16, 2026 at 12:07 am

    It is simply done with the Windows VirtualProtect() API function. It changes the virtual memory page attributes. From PAGE_READWRITE so the JIT compiler can write the machine code to PAGE_EXECUTE_READ so it can be executed. No special privileges are required to do so since the page is owned by the process that also runs the JIT compiler.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm in Vim. I want <cword> to consider "." are a character that is
Consider that I have the following javascript that do a post: $.post("/MyController/SomeAction", { myParam:
Consider: var resturl = "http://example.com"; cj.getJSON( resturl + "&callback=?", function(data) { console.log(data); } );
Consider: function Shape() { this.name = "Generic"; this.draw = function() { return "Drawing "
Consider we have a simple cycling Javascript process as: function test() { el=document.getElementById("test"); var
Consider the following HTML/css code sample: <div id="container"> <div id="up">Text<br />Text<br />Text<br /></div> <div
Consider the following form: <form action="/a" method="post"> <input name="x" type="text" onblur="myonblur(e)" /> <input name="y"
Consider: String string1 = "Hi there"; String string2 = "Hi"; String string3 = "Hi";
Consider this: string test = ""; somestring.ToList().Take(50).Select( delegate(char x) { test += x; return
Consider the following XML: <?xml version="1.0" encoding="utf-8"?> <treelist id="foo" displayname="display"> <treelink id="link" /> </treelist>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.