summaryrefslogtreecommitdiffstats
path: root/jemalloc/test
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2010-09-12 06:38:12 (GMT)
committerJason Evans <jasone@canonware.com>2010-09-12 06:38:12 (GMT)
commit8d7a94b275a7c26ff4207b943585661790b2e216 (patch)
tree21ca29dd6ea859964690523fa478e63433ce27ef /jemalloc/test
parent7e11b389aac64ed59a286b91887bcf68c2a597c4 (diff)
downloadjemalloc-8d7a94b275a7c26ff4207b943585661790b2e216.zip
jemalloc-8d7a94b275a7c26ff4207b943585661790b2e216.tar.gz
jemalloc-8d7a94b275a7c26ff4207b943585661790b2e216.tar.bz2
Fix porting regressions.
Fix new build failures and test failures on Linux that were introduced by the port to OS X.
Diffstat (limited to 'jemalloc/test')
-rw-r--r--jemalloc/test/posix_memalign.c15
-rw-r--r--jemalloc/test/posix_memalign.exp5
2 files changed, 7 insertions, 13 deletions
diff --git a/jemalloc/test/posix_memalign.c b/jemalloc/test/posix_memalign.c
index 0f2c879..cd3cadc 100644
--- a/jemalloc/test/posix_memalign.c
+++ b/jemalloc/test/posix_memalign.c
@@ -9,7 +9,7 @@
#define CHUNK 0x100000
/* #define MAXALIGN ((size_t)0x80000000000LLU) */
-#define MAXALIGN ((size_t)0x40000000LLU)
+#define MAXALIGN ((size_t)0x2000000LLU)
#define NITER 4
int
@@ -46,8 +46,8 @@ main(void)
alignment = 0x8000000000000000LLU;
size = 0x8000000000000000LLU;
#else
- alignment = 0x8000 0000LU;
- size = 0x8000 0000LU;
+ alignment = 0x80000000LU;
+ size = 0x80000000LU;
#endif
err = JEMALLOC_P(posix_memalign)(&p, alignment, size);
if (err == 0) {
@@ -86,22 +86,21 @@ main(void)
for (i = 0; i < NITER; i++)
ps[i] = NULL;
- for (alignment = sizeof(void *);
+ for (alignment = 8;
alignment <= MAXALIGN;
alignment <<= 1) {
total = 0;
fprintf(stderr, "Alignment: %zu\n", alignment);
for (size = 1;
size < 3 * alignment && size < (1U << 31);
- size += (alignment >> 2) - 1) {
+ size += (alignment >> (LG_SIZEOF_PTR-1)) - 1) {
for (i = 0; i < NITER; i++) {
err = JEMALLOC_P(posix_memalign)(&ps[i],
alignment, size);
if (err) {
fprintf(stderr,
- "Error for size 0x%x %zu : %s\n",
- (unsigned)size, size,
- strerror(err));
+ "Error for size %zu (0x%zx): %s\n",
+ size, size, strerror(err));
exit(1);
}
total += JEMALLOC_P(malloc_usable_size)(ps[i]);
diff --git a/jemalloc/test/posix_memalign.exp b/jemalloc/test/posix_memalign.exp
index f815b2f..b5061c7 100644
--- a/jemalloc/test/posix_memalign.exp
+++ b/jemalloc/test/posix_memalign.exp
@@ -22,9 +22,4 @@ Alignment: 4194304
Alignment: 8388608
Alignment: 16777216
Alignment: 33554432
-Alignment: 67108864
-Alignment: 134217728
-Alignment: 268435456
-Alignment: 536870912
-Alignment: 1073741824
Test end