| 115 | using MemoryPool::Reallocate; |
| 116 | |
| 117 | Status Allocate(int64_t size, int64_t /*alignment*/, uint8_t** out) override { |
| 118 | try { |
| 119 | *out = alloc_.allocate(size); |
| 120 | } catch (std::bad_alloc& e) { |
| 121 | return Status::OutOfMemory(e.what()); |
| 122 | } |
| 123 | stats_.DidAllocateBytes(size); |
| 124 | return Status::OK(); |
| 125 | } |
| 126 | |
| 127 | Status Reallocate(int64_t old_size, int64_t new_size, int64_t /*alignment*/, |
| 128 | uint8_t** ptr) override { |
no test coverage detected