From d5064aa8eae422f5f64906b15879a908dbd60266 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 25 May 2024 15:42:13 +0200 Subject: [PATCH] Try to prevent reallocs when building kernel symbols table. % wc -l /proc/kallsyms 419362 /proc/kallsyms --- public/client/TracyCallstack.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/client/TracyCallstack.cpp b/public/client/TracyCallstack.cpp index 455488ce..073188d9 100644 --- a/public/client/TracyCallstack.cpp +++ b/public/client/TracyCallstack.cpp @@ -795,7 +795,7 @@ static void InitKernelSymbols() { FILE* f = fopen( "/proc/kallsyms", "rb" ); if( !f ) return; - tracy::FastVector tmpSym( 1024 ); + tracy::FastVector tmpSym( 512 * 1024 ); size_t linelen = 16 * 1024; // linelen must be big enough to prevent reallocs in getline() auto linebuf = (char*)tracy_malloc( linelen ); ssize_t sz;