| 464 | |
| 465 | std::string MemoryAllocator::getAndClearFailureMessage() { |
| 466 | auto allocatorErrMsg = std::move(allocatorFailureMessage()); |
| 467 | allocatorFailureMessage().clear(); |
| 468 | if (cache()) { |
| 469 | if (allocatorErrMsg.empty()) { |
| 470 | return getAndClearCacheFailureMessage(); |
| 471 | } |
| 472 | allocatorErrMsg = |
| 473 | fmt::format("{} {}", allocatorErrMsg, getAndClearCacheFailureMessage()); |
| 474 | } |
| 475 | return allocatorErrMsg; |
| 476 | } |
| 477 | |
| 478 | namespace { |
| 479 | struct TraceState { |
| 480 | struct rusage rusage; |