Add test to exercise mi_usable_size on aligned allocations

This commit is contained in:
Cormac Relf 2020-04-06 21:05:44 +10:00
parent 6e1ca96a49
commit 414acd49ab

View File

@ -152,6 +152,9 @@ int main() {
}
result = ok;
});
CHECK_BODY("malloc-aligned5", {
void* p = mi_malloc_aligned(4097,4096); size_t usable = mi_usable_size(p); result = usable >= 4097 && usable < 10000; 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);
});