| 184 | }; |
| 185 | |
| 186 | void CheckValidAllocation(FreeListNode* computed_list_ptr, uint8_t* allocation) const { |
| 187 | // On debug, check that list is valid. |
| 188 | bool found = false; |
| 189 | for (int i = 0; i < NUM_LISTS && !found; ++i) { |
| 190 | if (computed_list_ptr == &lists_[i]) found = true; |
| 191 | } |
| 192 | DCHECK(found) << "Could not find list for ptr: " |
| 193 | << reinterpret_cast<void*>(allocation) |
| 194 | << ". Allocation could have already been freed." << std::endl |
| 195 | << DebugString(); |
| 196 | } |
| 197 | |
| 198 | std::string DebugString() const { |
| 199 | std::stringstream ss; |
nothing calls this directly
no test coverage detected