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

Method AllocateBuffer

be/src/runtime/row-batch.cc:333–345  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

331}
332
333Status RowBatch::AllocateBuffer(BufferPool::ClientHandle* client, int64_t len,
334 BufferPool::BufferHandle* buffer_handle) {
335 BufferPool* buffer_pool = ExecEnv::GetInstance()->buffer_pool();
336 int64_t buffer_len = BitUtil::RoundUpToPowerOfTwo(len);
337 buffer_len = max(buffer_pool->min_buffer_len(), buffer_len);
338 RETURN_IF_ERROR(
339 buffer_pool->AllocateUnreservedBuffer(client, buffer_len, buffer_handle));
340 if (UNLIKELY(!buffer_handle->is_open())) {
341 return mem_tracker_->MemLimitExceeded(
342 nullptr, "Failed to allocate row batch", buffer_len);
343 }
344 return Status::OK();
345}
346
347void RowBatch::AddBuffer(BufferPool::ClientHandle* client,
348 BufferPool::BufferHandle&& buffer, FlushMode flush) {

Callers 1

FromProtobufMethod · 0.45

Calls 7

maxFunction · 0.85
OKFunction · 0.85
buffer_poolMethod · 0.45
min_buffer_lenMethod · 0.45
is_openMethod · 0.45
MemLimitExceededMethod · 0.45

Tested by

no test coverage detected