| 143 | |
| 144 | struct DebugState { |
| 145 | void Invoke(uint8_t* ptr, int64_t size, const Status& st) { |
| 146 | std::lock_guard<std::mutex> lock(mutex_); |
| 147 | if (handler_) { |
| 148 | handler_(ptr, size, st); |
| 149 | } |
| 150 | } |
| 151 | |
| 152 | void SetHandler(MemoryDebugHandler handler) { |
| 153 | std::lock_guard<std::mutex> lock(mutex_); |