aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2001-10-15 19:52:10 +0000
committerH. Peter Anvin <hpa@zytor.com>2001-10-15 19:52:10 +0000
commit126bae3d727cfe2b7f2b5e42a52431a359c6a5dd (patch)
tree13ffe4124ce45cf5ccd0a9c309d1a9ddea430aeb
parent3c4b69a164ad54ff868985771d861f4ddd015619 (diff)
downloadlpsm-126bae3d727cfe2b7f2b5e42a52431a359c6a5dd.tar.gz
lpsm-126bae3d727cfe2b7f2b5e42a52431a359c6a5dd.tar.xz
lpsm-126bae3d727cfe2b7f2b5e42a52431a359c6a5dd.zip
Correct the computation of current_size in realloc(). It now passes the
stress tester all the way through.
-rw-r--r--alloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/alloc.c b/alloc.c
index db08c43..9b22672 100644
--- a/alloc.c
+++ b/alloc.c
@@ -755,7 +755,7 @@ static void *objstore_realloc_buddy(void *ptr, size_t new_size)
memory areas we need in order to avoid copying, otherwise
get new allocation and copy. */
- size_t current_size = (size_t)1 << bp.rorder;
+ size_t current_size = (size_t)1 << (ah->arena_size_lg2-bp.rorder);
xbit = bp.xbit;
for ( i = bp.rorder ; i > rorder ; i-- ) {