Test standard memory allocation and deallocation.
| 42 | |
| 43 | //Test standard memory allocation and deallocation. |
| 44 | TEST_F(HbwAllocatorTests, test_TC_MEMKIND_DetaultAllocatorTest) |
| 45 | { |
| 46 | const size_t size = 512; |
| 47 | hbw::allocator<size_t> allocator; |
| 48 | |
| 49 | hbw::allocator<size_t>::pointer ptr = allocator.allocate(size); |
| 50 | |
| 51 | ASSERT_TRUE(NULL != ptr); |
| 52 | |
| 53 | //Do the actually memory writing |
| 54 | for (size_t i=0; i<size; i++) { |
| 55 | ptr[i] = i; |
| 56 | } |
| 57 | |
| 58 | allocator.deallocate(ptr, size); |
| 59 | } |
| 60 | |
| 61 | //Test address convertion functionality. |
| 62 | TEST_F(HbwAllocatorTests, test_TC_MEMKIND_AddressConvertion) |