| 90 | } |
| 91 | |
| 92 | static void* AllocAndDealloc(void* arg) { |
| 93 | uintptr_t i = (uintptr_t)arg; |
| 94 | int len = GetBlockSize(i % 3); |
| 95 | int iterations = 1000; |
| 96 | while (iterations > 0) { |
| 97 | void* buf = AllocBlock(len); |
| 98 | EXPECT_TRUE(buf != NULL); |
| 99 | EXPECT_EQ(i % 3, GetBlockType(buf)); |
| 100 | DeallocBlock(buf); |
| 101 | --iterations; |
| 102 | } |
| 103 | return NULL; |
| 104 | } |
| 105 | |
| 106 | TEST_F(BlockPoolTest, multiple_thread) { |
| 107 | FLAGS_rdma_memory_pool_initial_size_mb = 1024; |
nothing calls this directly
no test coverage detected