| 241 | |
| 242 | |
| 243 | void MemoryTracker::LogStats() |
| 244 | { |
| 245 | log_ << "Number of Allocs: " << Allocs << '\n'; |
| 246 | log_ << "Number of DeAllocs: " << DeAllocs << '\n'; |
| 247 | log_ << "Number of bytes used: " << Bytes << '\n'; |
| 248 | |
| 249 | log_ << "Alloc size table:\n"; |
| 250 | log_ << " Bytes " << '\t' << " Times\n"; |
| 251 | |
| 252 | for (size_t i = 0; i < size_elements; ++i) { |
| 253 | log_ << " " << sizes[i].size_ << " " << '\t'; |
| 254 | log_ << std::setiosflags(std::ios::right) << std::setw(8); |
| 255 | log_ << sizes[i].count_ << '\n'; |
| 256 | } |
| 257 | |
| 258 | if (Allocs != DeAllocs) { |
| 259 | log_<< "Showing new'd allocs with no deletes" << '\n'; |
| 260 | applyInOrder(Root, show, &log_); |
| 261 | } |
| 262 | log_.flush(); |
| 263 | } |
| 264 | |
| 265 | |
| 266 | // return power of 2 up to size_tracker elements |
nothing calls this directly
no test coverage detected