mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
Improve placement of dynamically generated code on x64.
This commit is contained in:
parent
e38fbb3d0a
commit
e40b001a79
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user