MCPcopy Create free account
hub / github.com/apache/impala / FreeBuffers

Method FreeBuffers

be/src/runtime/bufferpool/buffer-pool-test.cc:269–276  ·  view source on GitHub ↗

Free all the 'buffers' and clear the vector. If 'randomize_core' is true, will switch thread between cores randomly before each free.

Source from the content-addressed store, hash-verified

267 /// If 'randomize_core' is true, will switch thread between cores randomly before
268 /// each free.
269 void FreeBuffers(BufferPool* pool, BufferPool::ClientHandle* client,
270 vector<BufferPool::BufferHandle>* buffers, bool randomize_core = false) {
271 for (auto& buffer : *buffers) {
272 if (randomize_core) CpuTestUtil::PinToRandomCore(&rng_);
273 pool->FreeBuffer(client, &buffer);
274 }
275 buffers->clear();
276 }
277
278 Status PinAll(BufferPool* pool, ClientHandle* client, vector<PageHandle>* pages) {
279 for (auto& page : *pages) RETURN_IF_ERROR(pool->Pin(client, &page));

Callers

nothing calls this directly

Calls 2

clearMethod · 0.65
FreeBufferMethod · 0.45

Tested by

no test coverage detected