| 304 | } |
| 305 | |
| 306 | DmaMemoryPool::~DmaMemoryPool() { |
| 307 | for (auto *ptr : pages_) { |
| 308 | FreeHugepage(ptr); |
| 309 | } |
| 310 | |
| 311 | if (!alloced_.empty()) { |
| 312 | LOG(WARNING) << "DmaMemoryPool " << this << " still has " << alloced_.size() |
| 313 | << " unfreed blocks!"; |
| 314 | } |
| 315 | } |
| 316 | |
| 317 | void *DmaMemoryPool::Alloc(size_t size) { |
| 318 | CHECK_GT(size, 0); |
nothing calls this directly
no test coverage detected