Skip to content

Commit 6db95cf

Browse files
author
REDMOND\jingf
committed
N/A
1 parent b63e9be commit 6db95cf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Tools/WinMLRunner/src/EventTraceHelper.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,9 @@ void EventTraceHelper::Start()
500500
{
501501
return;
502502
}
503+
504+
// Please refer to this link to understand why buffersize was setup in such a seemingly random manner:
505+
// https://docs.microsoft.com/en-us/windows/win32/api/evntrace/ns-evntrace-event_trace_propertiesbuffersize
503506
int bufferSize = sizeof(EVENT_TRACE_PROPERTIES) + (sizeof(LOGSESSION_NAME) + 1) * sizeof(wchar_t);
504507
m_sessionProperties = static_cast<PEVENT_TRACE_PROPERTIES>(malloc(bufferSize));
505508
ZeroMemory(m_sessionProperties, bufferSize);

0 commit comments

Comments
 (0)