diff options
author | Mike Pall <mike> | 2012-08-16 13:18:40 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2012-08-16 13:18:40 +0200 |
commit | d61e9e5d895fcf9443bd02a7a8dedcd41dd700a6 (patch) | |
tree | f2d0cbdc2e8a22e7500d0c08ad5434b33b911e94 /src | |
parent | 0dd175d9e711f039c663d35e96c149b705bcf450 (diff) | |
download | luajit-d61e9e5d895fcf9443bd02a7a8dedcd41dd700a6.tar.gz luajit-d61e9e5d895fcf9443bd02a7a8dedcd41dd700a6.tar.bz2 luajit-d61e9e5d895fcf9443bd02a7a8dedcd41dd700a6.zip |
Fix shrinking of direct mapped block in builtin allocator.
Diffstat (limited to 'src')
-rw-r--r-- | src/lj_alloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lj_alloc.c b/src/lj_alloc.c index e4ce7634..82b4e5b1 100644 --- a/src/lj_alloc.c +++ b/src/lj_alloc.c | |||
@@ -752,7 +752,7 @@ static mchunkptr direct_resize(mchunkptr oldp, size_t nb) | |||
752 | return NULL; | 752 | return NULL; |
753 | /* Keep old chunk if big enough but not too big */ | 753 | /* Keep old chunk if big enough but not too big */ |
754 | if (oldsize >= nb + SIZE_T_SIZE && | 754 | if (oldsize >= nb + SIZE_T_SIZE && |
755 | (oldsize - nb) <= (DEFAULT_GRANULARITY << 1)) { | 755 | (oldsize - nb) <= (DEFAULT_GRANULARITY >> 1)) { |
756 | return oldp; | 756 | return oldp; |
757 | } else { | 757 | } else { |
758 | size_t offset = oldp->prev_foot & ~IS_DIRECT_BIT; | 758 | size_t offset = oldp->prev_foot & ~IS_DIRECT_BIT; |