mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-27 00:04:35 +00:00
Restrict mem events list size.
This commit is contained in:
parent
867fc6a0cf
commit
7d32ef8c8b
@ -4586,7 +4586,11 @@ void View::DrawStatistics()
|
||||
template<class T>
|
||||
void View::ListMemData( T ptr, T end, std::function<const MemEvent*(T&)> DrawAddress )
|
||||
{
|
||||
ImGui::BeginChild( "##memScroll", ImVec2( 0, std::max( 200.f, ImGui::GetContentRegionAvail().y ) ) );
|
||||
const auto& style = ImGui::GetStyle();
|
||||
const auto dist = std::distance( ptr, end ) + 1;
|
||||
const auto ty = ImGui::GetTextLineHeight() + style.ItemSpacing.y;
|
||||
|
||||
ImGui::BeginChild( "##memScroll", ImVec2( 0, std::max( ty * std::min<int64_t>( dist, 5 ), std::min( ty * dist, ImGui::GetContentRegionAvail().y ) ) ) );
|
||||
ImGui::Columns( 7 );
|
||||
ImGui::Text( "Address" );
|
||||
ImGui::NextColumn();
|
||||
|
Loading…
Reference in New Issue
Block a user