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

Function crash_on_allocation_number

src/CppUTest/MemoryLeakWarningPlugin.cpp:509–516  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

507}
508
509void crash_on_allocation_number(unsigned alloc_number)
510{
511 static CrashOnAllocationAllocator crashAllocator;
512 crashAllocator.setNumberToCrashOn(alloc_number);
513 setCurrentMallocAllocator(&crashAllocator);
514 setCurrentNewAllocator(&crashAllocator);
515 setCurrentNewArrayAllocator(&crashAllocator);
516}
517
518class MemoryLeakWarningReporter: public MemoryLeakFailure
519{

Callers 1

TESTFunction · 0.85

Calls 4

setCurrentNewAllocatorFunction · 0.85
setNumberToCrashOnMethod · 0.80

Tested by 1

TESTFunction · 0.68