Skip to content

Commit

Permalink
Missing change
Browse files Browse the repository at this point in the history
  • Loading branch information
muit committed Dec 15, 2024
1 parent 175b934 commit a7da134
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions Src/Memory/MemoryStats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ namespace p
Release();
}

void MemoryStats::PrintAllocationError(
StringView error, AllocationStats* allocation, const backward::StackTrace* stack)
void MemoryStats::PrintAllocationError(StringView error, AllocationStats* allocation)
{
String msg;
Strings::FormatTo(msg, error);
Expand All @@ -65,18 +64,6 @@ namespace p
Strings::FormatTo(msg, " ({} {})", static_cast<void*>(allocation->ptr),
Strings::ParseMemorySize(allocation->size));
}

if (stack)
{
backward::TraceResolver tr;
tr.load_stacktrace(*stack);
for (sizet i = 0; i < stack->size(); ++i)
{
backward::ResolvedTrace trace = tr.resolve((*stack)[i]);
Strings::FormatTo(msg, "\n #{} {} {} [{}]", i, trace.object_filename,
trace.object_function, trace.addr);
}
}
std::puts(msg.data());
}

Expand Down Expand Up @@ -131,7 +118,7 @@ namespace p
const auto shown = Min<sizet>(64, allocations.Size());
for (i32 i = 0; i < shown; ++i)
{
PrintAllocationError("", &allocations[i], nullptr);
PrintAllocationError("", &allocations[i]);
}

if (shown < allocations.Size())
Expand Down

0 comments on commit a7da134

Please sign in to comment.