| Index: runtime/vm/os_test.cc
|
| diff --git a/runtime/vm/os_test.cc b/runtime/vm/os_test.cc
|
| index 7dd4bb8b3b8ba14f8d56ea762ab6f808bb5c5b48..a64fc824df682c488d54bc23ff60173c8714ed3d 100644
|
| --- a/runtime/vm/os_test.cc
|
| +++ b/runtime/vm/os_test.cc
|
| @@ -56,15 +56,26 @@ UNIT_TEST_CASE(OsFuncs) {
|
|
|
|
|
| UNIT_TEST_CASE(OSAlignedAllocate) {
|
| - void* p16 = OS::AlignedAllocate(1023, 16);
|
| - void* p32 = OS::AlignedAllocate(1025, 32);
|
| - void* p64 = OS::AlignedAllocate(1025, 64);
|
| - EXPECT((reinterpret_cast<intptr_t>(p16) & 15) == 0);
|
| - EXPECT((reinterpret_cast<intptr_t>(p32) & 31) == 0);
|
| - EXPECT((reinterpret_cast<intptr_t>(p64) & 63) == 0);
|
| - OS::AlignedFree(p16);
|
| - OS::AlignedFree(p32);
|
| - OS::AlignedFree(p64);
|
| + // TODO(johnmccutchan): Test other alignments, once we support
|
| + // alignments != 16 on Mac.
|
| + void* p1 = OS::AlignedAllocate(1023, 16);
|
| + void* p2 = OS::AlignedAllocate(1025, 16);
|
| + void* p3 = OS::AlignedAllocate(1025, 16);
|
| + void* p4 = OS::AlignedAllocate(1, 16);
|
| + void* p5 = OS::AlignedAllocate(2, 16);
|
| + void* p6 = OS::AlignedAllocate(4, 16);
|
| + EXPECT((reinterpret_cast<intptr_t>(p1) & 15) == 0);
|
| + EXPECT((reinterpret_cast<intptr_t>(p2) & 15) == 0);
|
| + EXPECT((reinterpret_cast<intptr_t>(p3) & 15) == 0);
|
| + EXPECT((reinterpret_cast<intptr_t>(p4) & 15) == 0);
|
| + EXPECT((reinterpret_cast<intptr_t>(p5) & 15) == 0);
|
| + EXPECT((reinterpret_cast<intptr_t>(p6) & 15) == 0);
|
| + OS::AlignedFree(p1);
|
| + OS::AlignedFree(p2);
|
| + OS::AlignedFree(p3);
|
| + OS::AlignedFree(p4);
|
| + OS::AlignedFree(p5);
|
| + OS::AlignedFree(p6);
|
| }
|
|
|
| } // namespace dart
|
|
|