mirror of
https://github.com/wolfpld/tracy
synced 2025-05-02 05:33:53 +00:00
Try to prevent reallocs when building kernel symbols table.
% wc -l /proc/kallsyms 419362 /proc/kallsyms
This commit is contained in:
parent
56b4424399
commit
d5064aa8ea
@ -795,7 +795,7 @@ static void InitKernelSymbols()
|
|||||||
{
|
{
|
||||||
FILE* f = fopen( "/proc/kallsyms", "rb" );
|
FILE* f = fopen( "/proc/kallsyms", "rb" );
|
||||||
if( !f ) return;
|
if( !f ) return;
|
||||||
tracy::FastVector<KernelSymbol> tmpSym( 1024 );
|
tracy::FastVector<KernelSymbol> tmpSym( 512 * 1024 );
|
||||||
size_t linelen = 16 * 1024; // linelen must be big enough to prevent reallocs in getline()
|
size_t linelen = 16 * 1024; // linelen must be big enough to prevent reallocs in getline()
|
||||||
auto linebuf = (char*)tracy_malloc( linelen );
|
auto linebuf = (char*)tracy_malloc( linelen );
|
||||||
ssize_t sz;
|
ssize_t sz;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user