
June 11, 2012
11:59 a.m.
Hi, On Sun, Jun 10, 2012 at 11:12 AM, Amaury Forgeot d'Arc <amauryfa@gmail.com> wrote:
I think memory allocated for JIT must be marked with PROT_EXEC (it contains machine code), so malloc() is not an option.
Exactly. On Linux it would work, because you can use mprotect() to make even malloc()ed memory executable, but I doubt this non-Posix extension works on cygwin. What might work instead would be using the Windows API instead of the POSIX one. In pypy/rlib/rmmap.py, look for "def alloc" and "def free": there are the two versions. A bientôt, Armin.