Allocate a block, free it, reallocate
| 155 | |
| 156 | // Allocate a block, free it, reallocate |
| 157 | void test_pool_realloc() { |
| 158 | MemoryPool pool(1024, 8); |
| 159 | void* ptr0 = pool.pool_alloc(128); |
| 160 | pool.pool_free(ptr0); |
| 161 | void* ptr1 = pool.pool_alloc(128); |
| 162 | validate_pool(pool, 128); |
| 163 | EXPECT_TRUE(ptr0 == ptr1); |
| 164 | |
| 165 | pool.pool_free(ptr1); |
| 166 | validate_pool(pool, 0); |
| 167 | } |
| 168 | |
| 169 | // Free a block and the one to its right, case II |
| 170 | void test_pool_free_join_right() { |
no test coverage detected