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

Class GlobalMemoryAccountant

include/CppUTest/TestMemoryAllocator.h:233–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

231};
232
233class GlobalMemoryAccountant
234{
235public:
236 GlobalMemoryAccountant();
237 ~GlobalMemoryAccountant();
238
239 void useCacheSizes(size_t sizes[], size_t length);
240
241 void start();
242 void stop();
243 SimpleString report();
244 SimpleString reportWithCacheSizes(size_t sizes[], size_t length);
245
246 TestMemoryAllocator* getMallocAllocator();
247 TestMemoryAllocator* getNewAllocator();
248 TestMemoryAllocator* getNewArrayAllocator();
249
250private:
251
252 void restoreMemoryAllocators();
253
254 MemoryAccountant accountant_;
255 AccountingTestMemoryAllocator* mallocAllocator_;
256 AccountingTestMemoryAllocator* newAllocator_;
257 AccountingTestMemoryAllocator* newArrayAllocator_;
258};
259
260#endif
261

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected