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

Method stop

src/CppUTest/TestMemoryAllocator.cpp:756–771  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

754}
755
756void GlobalMemoryAccountant::stop()
757{
758 if (mallocAllocator_ == NULLPTR)
759 FAIL("GlobalMemoryAccount: Stop called without starting");
760
761 if (getCurrentMallocAllocator() != mallocAllocator_)
762 FAIL("GlobalMemoryAccountant: Malloc memory allocator has been changed while accounting for memory");
763
764 if (getCurrentNewAllocator() != newAllocator_)
765 FAIL("GlobalMemoryAccountant: New memory allocator has been changed while accounting for memory");
766
767 if (getCurrentNewArrayAllocator() != newArrayAllocator_)
768 FAIL("GlobalMemoryAccountant: New Array memory allocator has been changed while accounting for memory");
769
770 restoreMemoryAllocators();
771}
772
773SimpleString GlobalMemoryAccountant::report()
774{

Callers

nothing calls this directly

Calls 3

getCurrentNewAllocatorFunction · 0.85

Tested by

no test coverage detected