| 8 | namespace NCoro::NStack::Tests { |
| 9 | |
| 10 | TEST(StackUtilsTest, Allocation) { |
| 11 | char *rawPtr, *alignedPtr = nullptr; |
| 12 | for (size_t i : {1, 2, 3, 4, 11}) { |
| 13 | EXPECT_TRUE(GetAlignedMemory(i, rawPtr, alignedPtr)); |
| 14 | EXPECT_TRUE(rawPtr); |
| 15 | EXPECT_TRUE(alignedPtr); |
| 16 | EXPECT_FALSE((size_t)alignedPtr & PageSizeMask); |
| 17 | free(rawPtr); |
| 18 | } |
| 19 | } |
| 20 | |
| 21 | #if !defined(_san_enabled_) && defined(_linux_) |
| 22 |
nothing calls this directly
no test coverage detected