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

Method CreatePinnedPage

be/src/runtime/bufferpool/buffer-pool.cc:452–465  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

450}
451
452BufferPool::Page* BufferPool::Client::CreatePinnedPage(BufferHandle&& buffer) {
453 Page* page = new Page(this, buffer.len());
454 page->buffer = move(buffer);
455 page->pin_count = 1;
456
457 std::lock_guard<std::mutex> lock(lock_);
458 // The buffer is transferred to the page so will be accounted for in
459 // pinned_pages_.bytes() instead of buffers_allocated_bytes_.
460 buffers_allocated_bytes_ -= page->len;
461 pinned_pages_.Enqueue(page);
462 ++num_pages_;
463 DCHECK_CONSISTENCY();
464 return page;
465}
466
467void BufferPool::Client::DestroyPageInternal(
468 PageHandle* handle, BufferHandle* out_buffer) {

Callers 1

CreatePageMethod · 0.80

Calls 3

moveFunction · 0.85
lenMethod · 0.45
EnqueueMethod · 0.45

Tested by

no test coverage detected