| 120 | } |
| 121 | |
| 122 | SimpleString CodeMemoryReportFormatter::getAllocationString(TestMemoryAllocator* allocator, const SimpleString& variableName, size_t size) |
| 123 | { |
| 124 | if (isNewAllocator(allocator)) |
| 125 | return StringFromFormat("char* %s = new char[%lu]; /* using %s */", variableName.asCharString(), (unsigned long) size, allocator->alloc_name()); |
| 126 | else |
| 127 | return StringFromFormat("void* %s = malloc(%lu);", variableName.asCharString(), (unsigned long) size); |
| 128 | } |
| 129 | |
| 130 | SimpleString CodeMemoryReportFormatter::getDeallocationString(TestMemoryAllocator* allocator, const SimpleString& variableName, const char* file, size_t line) |
| 131 | { |
nothing calls this directly
no test coverage detected