From 22bd2923eb33f7b04eec15144881f3130e2d9765 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Tue, 3 Apr 2018 19:35:43 +0200 Subject: [PATCH] Keep mem.low in a register. --- server/TracyView.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 6a3746be..f4cdf96d 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -4040,6 +4040,8 @@ Vector View::GetMemoryPages() const auto pgptr = ret.data(); memset( pgptr, 0, pages * PageSize ); + const auto memlow = mem.low; + if( m_memInfo.restrictTime ) { const auto zvMid = m_zvStart + ( m_zvEnd - m_zvStart ) / 2; @@ -4047,7 +4049,7 @@ Vector View::GetMemoryPages() const { if( m_memInfo.restrictTime && alloc.timeAlloc > zvMid ) continue; - const auto a0 = alloc.ptr - mem.low; + const auto a0 = alloc.ptr - memlow; const auto a1 = a0 + alloc.size; int8_t val = alloc.timeFree < 0 ? 1 : ( alloc.timeFree > zvMid ? 1 : -1 ); @@ -4082,7 +4084,7 @@ Vector View::GetMemoryPages() const { for( auto& alloc : mem.data ) { - const auto a0 = alloc.ptr - mem.low; + const auto a0 = alloc.ptr - memlow; const auto a1 = a0 + alloc.size; const int8_t val = alloc.timeFree < 0 ? 1 : -1;