| 317 | } |
| 318 | |
| 319 | char* 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. |
nothing calls this directly
no test coverage detected