diff --git a/server/TracyView.cpp b/server/TracyView.cpp index e0d51623..189024cc 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -3749,28 +3749,6 @@ void View::DrawRangeEntry( Range& range, const char* label, uint32_t color, cons } } -void View::DrawAllocList() -{ - const auto scale = GetScale(); - ImGui::SetNextWindowSize( ImVec2( 1100 * scale, 500 * scale ), ImGuiCond_FirstUseEver ); - ImGui::Begin( "Allocations list", &m_memInfo.showAllocList ); - if( ImGui::GetCurrentWindowRead()->SkipItems ) { ImGui::End(); return; } - - std::vector data; - auto basePtr = m_worker.GetMemoryNamed( m_memInfo.pool ).data.data(); - data.reserve( m_memInfo.allocList.size() ); - for( auto& idx : m_memInfo.allocList ) - { - data.emplace_back( basePtr + idx ); - } - - TextFocused( "Number of allocations:", RealToString( m_memInfo.allocList.size() ) ); - ListMemData( data, []( auto v ) { - ImGui::Text( "0x%" PRIx64, v->Ptr() ); - }, "##allocations", -1, m_memInfo.pool ); - ImGui::End(); -} - void View::CrashTooltip() { auto& crash = m_worker.GetCrashEvent(); diff --git a/server/TracyView_Memory.cpp b/server/TracyView_Memory.cpp index 91982231..d103c80a 100644 --- a/server/TracyView_Memory.cpp +++ b/server/TracyView_Memory.cpp @@ -897,4 +897,26 @@ void View::ListMemData( std::vector& vec, std::functionSkipItems ) { ImGui::End(); return; } + + std::vector data; + auto basePtr = m_worker.GetMemoryNamed( m_memInfo.pool ).data.data(); + data.reserve( m_memInfo.allocList.size() ); + for( auto& idx : m_memInfo.allocList ) + { + data.emplace_back( basePtr + idx ); + } + + TextFocused( "Number of allocations:", RealToString( m_memInfo.allocList.size() ) ); + ListMemData( data, []( auto v ) { + ImGui::Text( "0x%" PRIx64, v->Ptr() ); + }, "##allocations", -1, m_memInfo.pool ); + ImGui::End(); +} + }