summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authordaan <daanl@outlook.com>2021-12-17 13:25:44 -0800
committerdaan <daanl@outlook.com>2021-12-17 13:25:44 -0800
commit3d35147aba3463405b09821e66abfc0a1992b4c0 (patch)
tree66310f220050450b9de215444d04759da0f91fda /test
parentabbff9c0307d0f3ac1334fe1a45a34c402ca1531 (diff)
parentfaf2a7020c4d3234434b165f5c27f89d7777016b (diff)
Merge branch 'dev' into dev-slice
Diffstat (limited to 'test')
-rw-r--r--test/test-api.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/test-api.c b/test/test-api.c
index 1f810d5..56835d0 100644
--- a/test/test-api.c
+++ b/test/test-api.c
@@ -162,12 +162,18 @@ int main(void) {
void* p;
bool ok = true;
for (int i = 1; i < 8 && ok; i++) {
- size_t align = 1UL << i;
+ size_t align = (size_t)1 << i;
p = mi_malloc_aligned(2*align, align);
ok = (p != NULL && (uintptr_t)(p) % align == 0); mi_free(p);
}
result = ok;
});
+ CHECK_BODY("malloc-aligned7", {
+ void* p = mi_malloc_aligned(1024,MI_ALIGNED_MAX); mi_free(p);
+ });
+ CHECK_BODY("malloc-aligned8", {
+ void* p = mi_malloc_aligned(1024,2*MI_ALIGNED_MAX); mi_free(p);
+ });
CHECK_BODY("malloc-aligned-at1", {
void* p = mi_malloc_aligned_at(48,32,0); result = (p != NULL && ((uintptr_t)(p) + 0) % 32 == 0); mi_free(p);
});