mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-14 12:04:35 +00:00
Perform memory usage calculation on doubles.
This commit is contained in:
parent
aceaed25b9
commit
333d3a92c8
@ -513,7 +513,7 @@ Worker::Worker( FileRead& f, EventType::Type eventMask )
|
|||||||
f.Read( &sz, sizeof( sz ) );
|
f.Read( &sz, sizeof( sz ) );
|
||||||
if( eventMask & EventType::Memory )
|
if( eventMask & EventType::Memory )
|
||||||
{
|
{
|
||||||
Vector<std::pair<int64_t, uint64_t>> frees;
|
Vector<std::pair<int64_t, double>> frees;
|
||||||
frees.reserve( sz );
|
frees.reserve( sz );
|
||||||
|
|
||||||
m_data.memory.data.reserve_and_use( sz );
|
m_data.memory.data.reserve_and_use( sz );
|
||||||
@ -542,7 +542,7 @@ Worker::Worker( FileRead& f, EventType::Type eventMask )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
frees.push_back_no_space_check( std::make_pair( mem->timeFree, mem->size ) );
|
frees.push_back_no_space_check( std::make_pair( mem->timeFree, double( mem->size ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
mem++;
|
mem++;
|
||||||
@ -567,7 +567,7 @@ Worker::Worker( FileRead& f, EventType::Type eventMask )
|
|||||||
|
|
||||||
double min = 0;
|
double min = 0;
|
||||||
double max = std::numeric_limits<double>::min();
|
double max = std::numeric_limits<double>::min();
|
||||||
uint64_t usage = 0;
|
double usage = 0;
|
||||||
|
|
||||||
auto ptr = plot->data.data();
|
auto ptr = plot->data.data();
|
||||||
*ptr++ = { GetFrameBegin( 0 ), 0. };
|
*ptr++ = { GetFrameBegin( 0 ), 0. };
|
||||||
|
Loading…
Reference in New Issue
Block a user