Jonathan Worthington <[EMAIL PROTECTED]> wrote:
> Hi,

> I was looking over the WinXP Service Pack 2 "Changes to functionality"
> document, which you can get here:-

> http://www.microsoft.com/technet/treeview/default.asp?url=/technet/prodtechn
> ol/winxppro/maintain/winxpsp2.asp (download available in Word format)

> JIT was my first thought on reading this, and indeed it gets a specific
> mention in the document.  Turns out you need to use a bit of the Windows API
> (VirtualAlloc) and pass it flags to say execution of data in that page of
> memory is OK.

> I'm not sure how the memory used for JIT'ing is allocated right now - I
> think there are wrapper functions we call to do it - in which case they can
> do stuff on a platform specific basis.

JIT code is run in malloc'ed memory (s. jit.c:1026) as well as JITted
NCI stubs. We already have some system specific stuff for JIT (some
architectures need a page flush before execution).

So best would be to use a set of spcialized function, e.g.:
- mem_alloc_executable
- mem_realloc_executable
- mem_flush_executable
- mem_free_executable

> Anyways, figured it may be worth a mention now, so there isn't an
> out-of-the-blue "JIT doesn't work on XP SP2" bug report somewhere down the
> line.

Yep, thanks - always good to know, where problems might exist.

> Jonathan

leo

Reply via email to