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

Method ReleaseResources

be/src/exec/scratch-tuple-batch.h:109–118  ·  view source on GitHub ↗

Release all memory in the MemPools. If 'dst_pool' is non-NULL, transfers it to 'dst_pool'. Otherwise frees the memory.

Source from the content-addressed store, hash-verified

107 /// Release all memory in the MemPools. If 'dst_pool' is non-NULL, transfers it to
108 /// 'dst_pool'. Otherwise frees the memory.
109 void ReleaseResources(MemPool* dst_pool) {
110 if (dst_pool == nullptr) {
111 tuple_mem_pool.FreeAll();
112 aux_mem_pool.FreeAll();
113 } else {
114 dst_pool->AcquireData(&tuple_mem_pool, false);
115 dst_pool->AcquireData(&aux_mem_pool, false);
116 }
117 tuple_mem = nullptr;
118 }
119
120 /// Finalize transfer of 'num_to_commit' tuples to 'dst_batch' and transfer memory to
121 /// 'dst_batch' if at the end of 'scratch_batch'. The tuples must not yet be

Callers 7

TearDownMethod · 0.45
TEST_PFunction · 0.45
CloseMethod · 0.45
CloseMethod · 0.45

Calls 2

AcquireDataMethod · 0.80
FreeAllMethod · 0.45

Tested by 3

TearDownMethod · 0.36
TEST_PFunction · 0.36