| 105 | using MemoryPool::Reallocate; |
| 106 | |
| 107 | Status Allocate(int64_t size, int64_t /*alignment*/, uint8_t** out) override { |
| 108 | try { |
| 109 | *out = alloc_.allocate(size); |
| 110 | } catch (std::bad_alloc& e) { |
| 111 | return Status::OutOfMemory(e.what()); |
| 112 | } |
| 113 | stats_.DidAllocateBytes(size); |
| 114 | return Status::OK(); |
| 115 | } |
| 116 | |
| 117 | Status Reallocate(int64_t old_size, int64_t new_size, int64_t /*alignment*/, |
| 118 | uint8_t** ptr) override { |
no test coverage detected