Explorar o código

Improve placement of dynamically generated code on x64.

Mike Pall %!s(int64=15) %!d(string=hai) anos
pai
achega
e40b001a79
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/lj_mcode.c

+ 1 - 1
src/lj_mcode.c

@@ -128,7 +128,7 @@ static void *mcode_alloc(jit_State *J, size_t sz, int prot)
     uintptr_t hint;
     void *p;
     do {
-      hint = LJ_PRNG_BITS(J, 15) << 16;  /* 64K aligned. */
+      hint = (0x78fb ^ LJ_PRNG_BITS(J, 15)) << 16;  /* 64K aligned. */
     } while (!(hint + sz < range &&
 	       target + hint - (range>>1) < (uintptr_t)1<<47));
     p = mcode_alloc_at(J, target + hint - (range>>1), sz, prot);