| 145 | } |
| 146 | } |
| 147 | void MemoryPlanner::Schedule(std::function<void()> f) { |
| 148 | if (thread_pool_ == nullptr) { |
| 149 | f(); |
| 150 | } else { |
| 151 | thread_pool_->Schedule(std::move(f)); |
| 152 | } |
| 153 | } |
| 154 | |
| 155 | void MemoryPlanner::TrackAllocate(size_t alignment, size_t num_bytes) { |
| 156 | if (!is_stats_.load()) { |