We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4e30836 commit d62459fCopy full SHA for d62459f
src/lj_mcode.c
@@ -230,7 +230,8 @@ static void *mcode_alloc(jit_State *J, size_t sz)
230
/* First try a contiguous area below the last one. */
231
uintptr_t hint = J->mcarea ? (uintptr_t)J->mcarea - sz : 0;
232
int i;
233
- for (i = 0; i < 32; i++) { /* 32 attempts ought to be enough ... */
+ /* Limit probing iterations, depending on the available pool size. */
234
+ for (i = 0; i < LJ_TARGET_JUMPRANGE; i++) {
235
if (mcode_validptr(hint)) {
236
void *p = mcode_alloc_at(J, hint, sz, MCPROT_GEN);
237
0 commit comments