diff --git a/profiler/src/profiler/TracyView.cpp b/profiler/src/profiler/TracyView.cpp index e9746215..2bcb60f4 100644 --- a/profiler/src/profiler/TracyView.cpp +++ b/profiler/src/profiler/TracyView.cpp @@ -997,6 +997,18 @@ bool View::DrawImpl() dx = ImGui::GetCursorPosX() - cx; if( dx < targetLabelSize ) ImGui::SameLine( cx + targetLabelSize ); ImGui::Spacing(); + + if( m_worker.GetMemoryLimit() > 0 ) + { + ImGui::SameLine(); + TextColoredUnformatted( 0xFF00FFFF, ICON_FA_TRIANGLE_EXCLAMATION ); + if( ImGui::IsItemHovered() ) + { + ImGui::BeginTooltip(); + ImGui::Text( "Memory limit: %s", MemSizeToString( m_worker.GetMemoryLimit() ) ); + ImGui::EndTooltip(); + } + } } DrawNotificationArea(); diff --git a/server/TracyWorker.hpp b/server/TracyWorker.hpp index 2b73472e..f921facb 100644 --- a/server/TracyWorker.hpp +++ b/server/TracyWorker.hpp @@ -643,6 +643,7 @@ public: void Shutdown() { m_shutdown.store( true, std::memory_order_relaxed ); } void Disconnect(); bool WasDisconnectIssued() const { return m_disconnect; } + int64_t GetMemoryLimit() const { return m_memoryLimit; } void Write( FileWrite& f, bool fiDict ); int GetTraceVersion() const { return m_traceVersion; }