| 231 | }; |
| 232 | |
| 233 | class GlobalMemoryAccountant |
| 234 | { |
| 235 | public: |
| 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 | |
| 250 | private: |
| 251 | |
| 252 | void restoreMemoryAllocators(); |
| 253 | |
| 254 | MemoryAccountant accountant_; |
| 255 | AccountingTestMemoryAllocator* mallocAllocator_; |
| 256 | AccountingTestMemoryAllocator* newAllocator_; |
| 257 | AccountingTestMemoryAllocator* newArrayAllocator_; |
| 258 | }; |
| 259 | |
| 260 | #endif |
| 261 |
nothing calls this directly
no outgoing calls
no test coverage detected