aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lj_mcode.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lj_mcode.c b/src/lj_mcode.c
index b363136d..f0cf22ca 100644
--- a/src/lj_mcode.c
+++ b/src/lj_mcode.c
@@ -239,11 +239,11 @@ static void *mcode_alloc(jit_State *J, size_t sz)
239 return p; 239 return p;
240 if (p) mcode_free(J, p, sz); /* Free badly placed area. */ 240 if (p) mcode_free(J, p, sz); /* Free badly placed area. */
241 } 241 }
242 /* Next try probing pseudo-random addresses. */ 242 /* Next try probing 64K-aligned pseudo-random addresses. */
243 do { 243 do {
244 hint = (0x78fb ^ LJ_PRNG_BITS(J, 15)) << 16; /* 64K aligned. */ 244 hint = LJ_PRNG_BITS(J, LJ_TARGET_JUMPRANGE-16) << 16;
245 } while (!(hint + sz < range)); 245 } while (!(hint + sz < range+range));
246 hint = target + hint - (range>>1); 246 hint = target + hint - range;
247 } 247 }
248 lj_trace_err(J, LJ_TRERR_MCODEAL); /* Give up. OS probably ignores hints? */ 248 lj_trace_err(J, LJ_TRERR_MCODEAL); /* Give up. OS probably ignores hints? */
249 return NULL; 249 return NULL;