MCPcopy Create free account
hub / github.com/defold/defold / AllocateNewSample

Function AllocateNewSample

engine/profiler/src/basic/profiler_basic.cpp:131–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129};
130
131static Sample* AllocateNewSample(ThreadData* td)
132{
133 if (td->m_SamplePool.Full())
134 {
135 return 0;
136 }
137
138 td->m_SamplePool.SetSize(td->m_SamplePool.Size() + 1);
139 return td->m_SamplePool.End() - 1;
140}
141
142static void ResetThreadData(ThreadData* td)
143{

Callers 1

AllocateSampleFunction · 0.85

Calls 4

FullMethod · 0.45
SetSizeMethod · 0.45
SizeMethod · 0.45
EndMethod · 0.45

Tested by

no test coverage detected