Skip to content

Commit

Permalink
Added missing empty pool check to the PrintSummary() method of the Ap…
Browse files Browse the repository at this point in the history
…plication class.
  • Loading branch information
xvitaly committed Oct 4, 2024
1 parent 07187e6 commit d9b2f0e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/app/application/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ void Application::PrintSummary() const
return;
}

if (ZSwapDebugger -> GetPoolTotalSize() == 0)
{
std::cout << "ZSwap is not working. The pool is empty." << std::endl;
return;
}

std::unique_ptr<KSysInfo> SysInfo = std::make_unique<KSysInfo>();
const float PoolSize = static_cast<float>(ZSwapDebugger -> GetPoolTotalSize());
const float StoredPages = static_cast<float>(ZSwapDebugger -> GetStoredPages() * SysInfo -> GetPageSize());
Expand Down

0 comments on commit d9b2f0e

Please sign in to comment.