summaryrefslogtreecommitdiffstats
path: root/test/integration
diff options
context:
space:
mode:
authorQi Wang <interwq@gwu.edu>2019-08-05 19:59:21 (GMT)
committerQi Wang <interwq@gwu.edu>2019-08-05 19:59:21 (GMT)
commitea6b3e973b477b8061e0076bb257dbd7f3faa756 (patch)
treeeb52a159ee9b9cf80e87e809a80035e49d7f96e2 /test/integration
parentb0b3e49a54ec29e32636f4577d9d5a896d67fd20 (diff)
parent0cfa36a58a91b30996b30c948d67e1daf184c663 (diff)
downloadjemalloc-5.2.1.zip
jemalloc-5.2.1.tar.gz
jemalloc-5.2.1.tar.bz2
Merge branch 'dev'5.2.1
Diffstat (limited to 'test/integration')
-rw-r--r--test/integration/posix_memalign.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/integration/posix_memalign.c b/test/integration/posix_memalign.c
index 2c2726d..d992260 100644
--- a/test/integration/posix_memalign.c
+++ b/test/integration/posix_memalign.c
@@ -85,9 +85,10 @@ TEST_BEGIN(test_alignment_and_size) {
alignment <= MAXALIGN;
alignment <<= 1) {
total = 0;
- for (size = 1;
+ for (size = 0;
size < 3 * alignment && size < (1U << 31);
- size += (alignment >> (LG_SIZEOF_PTR-1)) - 1) {
+ size += ((size == 0) ? 1 :
+ (alignment >> (LG_SIZEOF_PTR-1)) - 1)) {
for (i = 0; i < NITER; i++) {
err = posix_memalign(&ps[i],
alignment, size);