| 726 | } |
| 727 | |
| 728 | void GlobalMemoryAccountant::start() |
| 729 | { |
| 730 | if (mallocAllocator_ != NULLPTR) |
| 731 | FAIL("Global allocator start called twice!"); |
| 732 | |
| 733 | mallocAllocator_ = new AccountingTestMemoryAllocator(accountant_, getCurrentMallocAllocator()); |
| 734 | newAllocator_ = new AccountingTestMemoryAllocator(accountant_, getCurrentNewAllocator()); |
| 735 | newArrayAllocator_ = new AccountingTestMemoryAllocator(accountant_, getCurrentNewArrayAllocator()); |
| 736 | |
| 737 | accountant_.setAllocator(getCurrentMallocAllocator()); |
| 738 | |
| 739 | setCurrentMallocAllocator(mallocAllocator_); |
| 740 | setCurrentNewAllocator(newAllocator_); |
| 741 | setCurrentNewArrayAllocator(newArrayAllocator_); |
| 742 | } |
| 743 | |
| 744 | void GlobalMemoryAccountant::restoreMemoryAllocators() |
| 745 | { |
nothing calls this directly
no test coverage detected