| 31 | class HugepageTest : public ::testing::TestWithParam<HugepageSize> { |
| 32 | public: |
| 33 | virtual void SetUp() override { |
| 34 | HugepageSize type = GetParam(); |
| 35 | size_ = static_cast<size_t>(type); |
| 36 | ptr_ = AllocHugepage(type); |
| 37 | |
| 38 | if (ptr_ == nullptr) { |
| 39 | std::cerr << "Hugepage (" << size_ << " bytes) not available." |
| 40 | << " Skipping test..." << std::endl; |
| 41 | } else { |
| 42 | ASSERT_LE(kVirtualAddressStart, reinterpret_cast<uintptr_t>(ptr_)); |
| 43 | ASSERT_GT(kVirtualAddressEnd, reinterpret_cast<uintptr_t>(ptr_)); |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | virtual void TearDown() override { FreeHugepage(ptr_); } |
| 48 |
nothing calls this directly
no test coverage detected