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

Method TryAllocate

be/src/runtime/mem-pool.h:133–136  ·  view source on GitHub ↗

Same as Allocate() except the mem limit is checked before the allocation and this call will fail (returns NULL) if it does. The caller must handle the NULL case. This should be used for allocations where the size can be very big to bound the amount by which we exceed mem limits.

Source from the content-addressed store, hash-verified

131 /// The caller must handle the NULL case. This should be used for allocations
132 /// where the size can be very big to bound the amount by which we exceed mem limits.
133 uint8_t* TryAllocate(int64_t size) noexcept {
134 DFAKE_SCOPED_LOCK(mutex_);
135 return Allocate<true>(size, DEFAULT_ALIGNMENT);
136 }
137
138 /// Same as TryAllocate() except a non-default alignment can be specified. It
139 /// should be a power-of-two in [1, alignof(std::max_align_t)].

Callers 15

TryCompactMethod · 0.45
InitTmpTupleMethod · 0.45
LoadMethod · 0.45
ConvertArrayFromKuduMethod · 0.45
StartRowGroupMethod · 0.45
ReadAllMethod · 0.45
OpenMethod · 0.45
ReadBloomFilterHeaderMethod · 0.45

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.36