Commit 31b2b520 authored by Pascal Palenda's avatar Pascal Palenda
Browse files

Add reserved memory to profiler

parent 9d999b76
......@@ -17,11 +17,18 @@ namespace ITA
{
namespace Profiler
{
const int NUMBER_RESERVED_OBJECTS = 1000000;
///
/// \brief Profiler data for a section.
///
struct ProfileSection
{
ProfileSection ( )
{
vpStartEndTimes.reserve ( NUMBER_RESERVED_OBJECTS );
}
void AddSection ( const CSection& oSection )
{
vpStartEndTimes.emplace_back ( oSection.m_dBegin, oSection.m_dEnd );
......@@ -40,6 +47,11 @@ namespace ITA
///
struct ProfileEventCount
{
ProfileEventCount ( )
{
vTimeStamps.reserve ( NUMBER_RESERVED_OBJECTS );
}
///
/// \brief Add another event.
///
......@@ -61,6 +73,11 @@ namespace ITA
///
struct ProfileValue
{
ProfileValue ( )
{
voValueData.reserve ( NUMBER_RESERVED_OBJECTS );
}
///
/// \brief Add a Value to the ProfileValue.
/// \param valueData the ValueData to be added.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment