mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +00:00
Calculate end point before loop.
This commit is contained in:
parent
8f85a0da2c
commit
61d775ecc8
@ -9388,9 +9388,10 @@ std::vector<MemoryPage> View::GetMemoryPages() const
|
||||
if( m_memInfo.restrictTime )
|
||||
{
|
||||
const auto zvMid = m_zvStart + ( m_zvEnd - m_zvStart ) / 2;
|
||||
for( auto& alloc : mem.data )
|
||||
auto end = std::upper_bound( mem.data.begin(), mem.data.end(), zvMid, []( const auto& lhs, const auto& rhs ) { return lhs < rhs.timeAlloc; } );
|
||||
for( auto it = mem.data.begin(); it != end; ++it )
|
||||
{
|
||||
if( alloc.timeAlloc > zvMid ) break;
|
||||
auto& alloc = *it;
|
||||
|
||||
const auto a0 = alloc.ptr - memlow;
|
||||
const auto a1 = a0 + alloc.size;
|
||||
|
Loading…
Reference in New Issue
Block a user