Compare commits

..

1 Commits

Author SHA1 Message Date
8ebdcb27a8 Add stack trace, fix tracking for expandable arenas 2025-12-18 18:54:19 -05:00
2 changed files with 2 additions and 4 deletions

View File

@ -82,8 +82,6 @@ void log_error_internal (string file_path, string function_name, s32 line_number
Assert(tctx != nullptr); Assert(tctx != nullptr);
push_arena(tctx->error_arena); push_arena(tctx->error_arena);
// Why don't we use thread_context->log_builder here??
// String_Builder* sb = new_string_builder(Arena_Reserve::Size_64K);
String_Builder* sb = thread_context()->log_builder; String_Builder* sb = thread_context()->log_builder;
print_to_builder(sb, "%s ", error_severity(severity)); print_to_builder(sb, "%s ", error_severity(severity));
@ -95,7 +93,6 @@ void log_error_internal (string file_path, string function_name, s32 line_number
append(sb, "\n"); append(sb, "\n");
// string error_string = builder_to_string(sb);
string error_string = copy_string(string_view(sb)); string error_string = copy_string(string_view(sb));
reset_string_builder(sb); reset_string_builder(sb);

View File

@ -336,7 +336,8 @@ void ImGui_Debug_Panel () { using namespace ImGui;
}*/ }*/
#if BUILD_DEBUG #if BUILD_DEBUG
SeparatorText("Default Allocator Allocations"); SeparatorText("Default Allocator Allocations");
{ auto allocations = to_view(get_general_allocator_data()->allocations); { lock_guard(&allocator_mutex);
auto allocations = to_view(get_general_allocator_data()->allocations);
Text("%s in %lld allocations", Text("%s in %lld allocations",
format_bytes(get_general_allocator_data()->total_bytes_allocated).data, format_bytes(get_general_allocator_data()->total_bytes_allocated).data,
allocations.count); allocations.count);