From 52142afeb8a3a8adf24c07ff9497fa42c810f6eb Mon Sep 17 00:00:00 2001 From: Drew Galbraith Date: Tue, 14 Nov 2023 21:41:35 -0800 Subject: [PATCH] [Zion] Add proc prefix without allocation --- zion/debug/debug.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/zion/debug/debug.cpp b/zion/debug/debug.cpp index 0256bdd..27279e6 100644 --- a/zion/debug/debug.cpp +++ b/zion/debug/debug.cpp @@ -30,7 +30,11 @@ void dbg(const glcr::StringView& str) { void AddProcPrefix() { if (gScheduler != nullptr) { auto t = gScheduler->CurrentThread(); - dbg(glcr::StrFormat("[{}.{}] ", t->pid(), t->tid())); + + char buffer[16]; + glcr::FixedStringBuilder builder(buffer, 16); + glcr::StrFormatIntoBuffer(builder, "[{}.{}] ", t->pid(), t->tid()); + dbg(builder); } }