MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / SubGroupMemory

Function SubGroupMemory

Source/Engine/Profiler/ProfilerMemory.cpp:205–225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203 }
204
205 FORCE_INLINE void SubGroupMemory(ProfilerMemory::Groups group, int64 add)
206 {
207 // Group itself
208 Platform::InterlockedAdd(&GroupMemory[(int32)group], add);
209 Platform::InterlockedDecrement(&GroupMemoryCount[(int32)group]);
210 UpdateGroupTracyPlot(group);
211
212 // Total memory
213 Platform::InterlockedAdd(&GroupMemory[(int32)ProfilerMemory::Groups::TotalTracked], add);
214 Platform::InterlockedDecrement(&GroupMemoryCount[(int32)ProfilerMemory::Groups::TotalTracked]);
215
216 // Group hierarchy parents
217 uint8 parent = GroupParents[(int32)group];
218 while (parent != 0)
219 {
220 Platform::InterlockedAdd(&GroupMemory[parent], add);
221 Platform::InterlockedDecrement(&GroupMemoryCount[parent]);
222 UpdateGroupTracyPlot((ProfilerMemory::Groups)parent);
223 parent = GroupParents[parent];
224 }
225 }
226}
227
228void InitProfilerMemory(const Char* cmdLine, int32 stage)

Callers 2

DecrementGroupMethod · 0.85
OnMemoryFreeMethod · 0.85

Calls 3

UpdateGroupTracyPlotFunction · 0.85
InterlockedAddFunction · 0.50
InterlockedDecrementFunction · 0.50

Tested by

no test coverage detected