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

Method AllocateStrings

be/src/runtime/tuple.cc:319–329  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

317}
318
319char* Tuple::AllocateStrings(const char* err_ctx, RuntimeState* state,
320 int64_t bytes, MemPool* pool, Status* status) noexcept {
321 char* buf = reinterpret_cast<char*>(pool->TryAllocateUnaligned(bytes));
322 if (UNLIKELY(buf == nullptr)) {
323 string details = Substitute("$0 failed to allocate $1 bytes for strings.",
324 err_ctx, bytes);
325 *status = pool->mem_tracker()->MemLimitExceeded(state, details, bytes);
326 return nullptr;
327 }
328 return buf;
329}
330
331// Codegens an unrolled version of MaterializeExprs(). Uses codegen'd exprs and slot
332// writes. If 'pool' is non-NULL, string data is copied into it.

Callers

nothing calls this directly

Calls 4

SubstituteFunction · 0.85
TryAllocateUnalignedMethod · 0.80
MemLimitExceededMethod · 0.45
mem_trackerMethod · 0.45

Tested by

no test coverage detected