File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change 18
18
#include " base.hpp"
19
19
using umf_test::test;
20
20
21
+ #define ALLOC_MIN_ALIGNMENT 8
22
+
21
23
// ------------------------------------------------------------------------
22
24
// Configurable defs
23
25
// ------------------------------------------------------------------------
@@ -57,15 +59,9 @@ void malloc_compliance_test(umf_memory_pool_handle_t hPool) {
57
59
alloc_ptr_size[i] = rand_alloc_size (MAX_ALLOC_SIZE);
58
60
alloc_ptr[i] = umfPoolMalloc (hPool, alloc_ptr_size[i]);
59
61
60
- #ifndef _WIN32 // TODO: explain why it fails on some Windows systems
61
- // Supported under USE_WEAK_ALIGNMENT_RULES macro
62
- // For compatibility, on 64-bit systems malloc should align to 16 bytes
63
- size_t alignment =
64
- (sizeof (intptr_t ) > 4 && alloc_ptr_size[i] > 8 ) ? 16 : 8 ;
65
- ASSERT_NE (addressIsAligned (alloc_ptr[i], alignment), 0 )
62
+ ASSERT_NE (addressIsAligned (alloc_ptr[i], ALLOC_MIN_ALIGNMENT), 0 )
66
63
<< " Malloc should return pointer that is suitably aligned so that "
67
64
" it may be assigned to a pointer to any type of object" ;
68
- #endif
69
65
70
66
// Fill memory with a pattern ((id of the allocation) % 256)
71
67
ASSERT_NE (alloc_ptr[i], nullptr )
You can’t perform that action at this time.
0 commit comments