| 218 | } |
| 219 | |
| 220 | void TensorPoolAllocator::Bin::Deallocate(Header* header) { |
| 221 | if (header->internal_bin == nullptr) { |
| 222 | buffer_.Deallocate(header->raw_ptr); |
| 223 | } else { |
| 224 | virtual_buffer_.Deallocate(header->raw_ptr, |
| 225 | (TensorPoolAllocator::Bin*)(header->internal_bin)); |
| 226 | } |
| 227 | } |
| 228 | |
| 229 | void* TensorPoolAllocator::Bin::AllocateRaw() { |
| 230 | return buffer_.Allocate(); |