| 36 | } |
| 37 | |
| 38 | Status 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 | |
| 50 | int64_t TempVectorStack::PaddedAllocationSize(int64_t num_bytes) { |
| 51 | // Round up allocation size to multiple of 8 bytes |
nothing calls this directly
no test coverage detected