]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
Fix shrinking of direct mapped block in builtin allocator.
authorMike Pall <mike>
Thu, 16 Aug 2012 11:18:40 +0000 (13:18 +0200)
committerMike Pall <mike>
Thu, 16 Aug 2012 11:18:40 +0000 (13:18 +0200)
src/lj_alloc.c

index e4ce76347bda29d06fd3bc37c86d1a57e5fecf19..82b4e5b165a845d034c5480af635acafae8bdb49 100644 (file)
@@ -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;