MCPcopy Create free account
hub / github.com/cpputest/cpputest / startMemoryLeakReporting

Method startMemoryLeakReporting

src/CppUTest/MemoryLeakDetector.cpp:153–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151}
152
153void MemoryLeakOutputStringBuffer::startMemoryLeakReporting()
154{
155 giveWarningOnUsingMalloc_ = false;
156 total_leaks_ = 0;
157
158 size_t memory_leak_normal_footer_size = sizeof(MEM_LEAK_FOOTER) + 10 + sizeof(MEM_LEAK_TOO_MUCH); /* the number of leaks */
159 size_t memory_leak_foot_size_with_malloc_warning = memory_leak_normal_footer_size + sizeof(MEM_LEAK_ADDITION_MALLOC_WARNING);
160
161 outputBuffer_.setWriteLimit(SimpleStringBuffer::SIMPLE_STRING_BUFFER_LEN - memory_leak_foot_size_with_malloc_warning);
162}
163
164void MemoryLeakOutputStringBuffer::reportMemoryLeak(MemoryLeakDetectorNode* leak)
165{

Callers 1

Calls 1

setWriteLimitMethod · 0.80

Tested by

no test coverage detected