| 82 | } |
| 83 | |
| 84 | void TempVectorStack::release(int id, uint32_t num_bytes) { |
| 85 | ARROW_DCHECK(num_vectors_ == id + 1); |
| 86 | int64_t size = EstimatedAllocationSize(num_bytes); |
| 87 | ARROW_DCHECK(reinterpret_cast<const uint64_t*>(buffer_->mutable_data() + top_)[-1] == |
| 88 | kGuard2); |
| 89 | ARROW_DCHECK(top_ >= size); |
| 90 | top_ -= size; |
| 91 | ARROW_DCHECK(reinterpret_cast<const uint64_t*>(buffer_->mutable_data() + top_)[0] == |
| 92 | kGuard1); |
| 93 | #ifdef ADDRESS_SANITIZER |
| 94 | ASAN_POISON_MEMORY_REGION(buffer_->mutable_data() + top_, size); |
| 95 | #endif |
| 96 | --num_vectors_; |
| 97 | } |
| 98 | |
| 99 | } // namespace util |
| 100 | } // namespace arrow |