mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-04 22:49:32 +03:00
fix tests for aligned allocation
This commit is contained in:
parent
ce81af1119
commit
8903d7a526
1 changed files with 3 additions and 3 deletions
|
@ -124,13 +124,13 @@ int main() {
|
|||
void* p = mi_malloc_aligned(32,24); result = (p != NULL && (uintptr_t)(p) % 24 == 0); mi_free(p);
|
||||
});
|
||||
CHECK_BODY("malloc-aligned2", {
|
||||
void* p = mi_malloc_aligned(8,24); result = (p != NULL && (uintptr_t)(p) % 24 == 0); mi_free(p);
|
||||
void* p = mi_malloc_aligned(48,24); result = (p != NULL && (uintptr_t)(p) % 24 == 0); mi_free(p);
|
||||
});
|
||||
CHECK_BODY("malloc-aligned-at1", {
|
||||
void* p = mi_malloc_aligned_at(8,24,0); result = (p != NULL && ((uintptr_t)(p) + 0) % 24 == 0); mi_free(p);
|
||||
void* p = mi_malloc_aligned_at(48,24,0); result = (p != NULL && ((uintptr_t)(p) + 0) % 24 == 0); mi_free(p);
|
||||
});
|
||||
CHECK_BODY("malloc-aligned-at2", {
|
||||
void* p = mi_malloc_aligned_at(5,24,8); result = (p != NULL && ((uintptr_t)(p) + 8) % 24 == 0); mi_free(p);
|
||||
void* p = mi_malloc_aligned_at(50,24,8); result = (p != NULL && ((uintptr_t)(p) + 8) % 24 == 0); mi_free(p);
|
||||
});
|
||||
|
||||
// ---------------------------------------------------
|
||||
|
|
Loading…
Add table
Reference in a new issue