| 162 | } |
| 163 | |
| 164 | void MemoryLeakOutputStringBuffer::reportMemoryLeak(MemoryLeakDetectorNode* leak) |
| 165 | { |
| 166 | if (total_leaks_ == 0) { |
| 167 | addMemoryLeakHeader(); |
| 168 | } |
| 169 | |
| 170 | total_leaks_++; |
| 171 | outputBuffer_.add("Alloc num (%u) Leak size: %lu Allocated at: %s and line: %d. Type: \"%s\"\n\tMemory: <%p> Content:\n", |
| 172 | leak->number_, (unsigned long) leak->size_, leak->file_, (int) leak->line_, leak->allocator_->alloc_name(), (void*) leak->memory_); |
| 173 | outputBuffer_.addMemoryDump(leak->memory_, leak->size_); |
| 174 | |
| 175 | if (SimpleString::StrCmp(leak->allocator_->alloc_name(), (const char*) "malloc") == 0) |
| 176 | giveWarningOnUsingMalloc_ = true; |
| 177 | } |
| 178 | |
| 179 | void MemoryLeakOutputStringBuffer::stopMemoryLeakReporting() |
| 180 | { |
no test coverage detected