| 467 | MyMemoryPool() : num_allocations_(0) {} |
| 468 | |
| 469 | Status Allocate(int64_t size, int64_t /*alignment*/, uint8_t** out) override { |
| 470 | *out = reinterpret_cast<uint8_t*>(std::malloc(size)); |
| 471 | ++num_allocations_; |
| 472 | return Status::OK(); |
| 473 | } |
| 474 | |
| 475 | void Free(uint8_t* buffer, int64_t size, int64_t /*alignment*/) override { |
| 476 | std::free(buffer); |