| 1585 | } |
| 1586 | |
| 1587 | string AllocatorAttributesToString( |
| 1588 | const std::vector<AllocatorAttributes>& attrs) { |
| 1589 | string result("["); |
| 1590 | // AllocatorAttribute::DebugString produces around 85 bytes now. |
| 1591 | result.reserve(100 * attrs.size()); |
| 1592 | for (const AllocatorAttributes& attr : attrs) { |
| 1593 | result.append(attr.DebugString()); |
| 1594 | result.append(", "); |
| 1595 | } |
| 1596 | if (!attrs.empty()) { |
| 1597 | result.resize(result.size() - 2); |
| 1598 | } |
| 1599 | result.append("]"); |
| 1600 | return result; |
| 1601 | } |
| 1602 | |
| 1603 | const char* IsSet(void* ptr) { return ptr == nullptr ? "unset" : "set"; } |
| 1604 |
no test coverage detected