| 85 | template <typename Derived> |
| 86 | struct PoolAllocationMixin { |
| 87 | static void* operator new(size_t size) { |
| 88 | DCHECK_EQ(size, sizeof(Derived)); |
| 89 | uint8_t* data; |
| 90 | ARROW_CHECK_OK(default_memory_pool()->Allocate(static_cast<int64_t>(size), &data)); |
| 91 | return data; |
| 92 | } |
| 93 | |
| 94 | static void operator delete(void* ptr) { |
| 95 | default_memory_pool()->Free(reinterpret_cast<uint8_t*>(ptr), sizeof(Derived)); |
nothing calls this directly
no test coverage detected