| 123 | } |
| 124 | |
| 125 | void ProcessState::AddCPUAllocVisitor(SubAllocator::Visitor visitor) { |
| 126 | VLOG(1) << "AddCPUAllocVisitor"; |
| 127 | mutex_lock lock(mu_); |
| 128 | CHECK_EQ(0, cpu_allocators_.size()) // Crash OK |
| 129 | << "AddCPUAllocVisitor must be called prior to first call to " |
| 130 | "ProcessState::GetCPUAllocator"; |
| 131 | cpu_alloc_visitors_.push_back(std::move(visitor)); |
| 132 | } |
| 133 | |
| 134 | void ProcessState::AddCPUFreeVisitor(SubAllocator::Visitor visitor) { |
| 135 | mutex_lock lock(mu_); |
no test coverage detected