From 462080a92e8df7ad718bdee69740914c8c2ac1d5 Mon Sep 17 00:00:00 2001 From: Daan Date: Fri, 14 Apr 2023 10:02:01 -0700 Subject: [PATCH] add test for issue #602 --- test/test-api.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/test-api.c b/test/test-api.c index 852e3e8a..829d7d35 100644 --- a/test/test-api.c +++ b/test/test-api.c @@ -212,6 +212,11 @@ int main(void) { result = mi_heap_contains_block(heap, p); mi_heap_destroy(heap); } + CHECK_BODY("mimalloc-aligned12") { + void* p = mi_malloc_aligned(0x100, 0x100); + result = (((uintptr_t)p % 0x100) == 0); // #602 + 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); };