MCPcopy Create free account
hub / github.com/apache/arrow / Init

Method Init

cpp/src/arrow/compute/util_internal.cc:38–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38Status TempVectorStack::Init(MemoryPool* pool, int64_t size) {
39 num_vectors_ = 0;
40 top_ = 0;
41 buffer_size_ = EstimatedAllocationSize(size);
42 ARROW_ASSIGN_OR_RAISE(auto buffer, AllocateResizableBuffer(buffer_size_, pool));
43#ifdef ADDRESS_SANITIZER
44 ASAN_POISON_MEMORY_REGION(buffer->mutable_data(), buffer_size_);
45#endif
46 buffer_ = std::move(buffer);
47 return Status::OK();
48}
49
50int64_t TempVectorStack::PaddedAllocationSize(int64_t num_bytes) {
51 // Round up allocation size to multiple of 8 bytes

Callers

nothing calls this directly

Calls 2

OKFunction · 0.50
mutable_dataMethod · 0.45

Tested by

no test coverage detected