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

Method allocate

be/src/runtime/mem-tracker.h:594–600  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

592 ~MemTrackerAllocator() {}
593
594 pointer allocate(size_type n, const_pointer hint = 0) {
595 // Ideally we'd use TryConsume() here to enforce the tracker's limit.
596 // However, that means throwing bad_alloc if the limit is exceeded, and
597 // it's not clear that the rest of Kudu can handle that.
598 mem_tracker_->Consume(n * sizeof(T));
599 return Alloc::allocate(n, hint);
600 }
601
602 void deallocate(pointer p, size_type n) {
603 Alloc::deallocate(p, n);

Callers

nothing calls this directly

Calls 1

ConsumeMethod · 0.45

Tested by

no test coverage detected