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

Method restoreMemoryAllocators

src/CppUTest/TestMemoryAllocator.cpp:744–754  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

742}
743
744void GlobalMemoryAccountant::restoreMemoryAllocators()
745{
746 if (getCurrentMallocAllocator() == mallocAllocator_)
747 setCurrentMallocAllocator(mallocAllocator_->originalAllocator());
748
749 if (getCurrentNewAllocator() == newAllocator_)
750 setCurrentNewAllocator(newAllocator_->originalAllocator());
751
752 if (getCurrentNewArrayAllocator() == newArrayAllocator_)
753 setCurrentNewArrayAllocator(newArrayAllocator_->originalAllocator());
754}
755
756void GlobalMemoryAccountant::stop()
757{

Callers

nothing calls this directly

Calls 7

getCurrentNewAllocatorFunction · 0.85
setCurrentNewAllocatorFunction · 0.85
originalAllocatorMethod · 0.45

Tested by

no test coverage detected