mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
Fix shrinking of direct mapped block in builtin allocator.
This commit is contained in:
parent
0dd175d9e7
commit
d61e9e5d89
@ -752,7 +752,7 @@ static mchunkptr direct_resize(mchunkptr oldp, size_t nb)
|
||||
return NULL;
|
||||
/* Keep old chunk if big enough but not too big */
|
||||
if (oldsize >= nb + SIZE_T_SIZE &&
|
||||
(oldsize - nb) <= (DEFAULT_GRANULARITY << 1)) {
|
||||
(oldsize - nb) <= (DEFAULT_GRANULARITY >> 1)) {
|
||||
return oldp;
|
||||
} else {
|
||||
size_t offset = oldp->prev_foot & ~IS_DIRECT_BIT;
|
||||
|
Loading…
Reference in New Issue
Block a user