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

Method SpareCapacity

be/src/runtime/mem-tracker.cc:163–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

161}
162
163int64_t MemTracker::SpareCapacity(MemLimit mode) const {
164 int64_t result = numeric_limits<int64_t>::max();
165 for (MemTracker* tracker : limit_trackers_) {
166 int64_t mem_left = tracker->GetLimit(mode) - tracker->consumption();
167 result = std::min(result, mem_left);
168 }
169 return result;
170}
171
172void MemTracker::RefreshConsumptionFromMetric() {
173 DCHECK(consumption_metric_ != nullptr);

Callers 3

TESTFunction · 0.45
MemLimitExceededMethod · 0.45

Calls 4

maxFunction · 0.85
minFunction · 0.85
GetLimitMethod · 0.80
consumptionMethod · 0.45

Tested by 1

TESTFunction · 0.36