Class ProfilerMemory
Provides memory allocations collecting utilities.
Inheritance
Inherited Members
Assembly: FlaxEngine.dll
File: Engine/Profiler/ProfilerMemory.h
Syntax
public class ProfilerMemory
Fields
Enabled
The profiling tools usage flag. Can be used to disable profiler. Run engine with '-mem' command line to activate it from start.
Declaration
public static bool Enabled
Field Value
|
bool
|
Methods
BeginGroup(Groups group)
Enters a new group context scope (by the current thread). Informs the profiler about context of any memory allocations within.
Declaration
public static void BeginGroup(Groups group)
Parameters
|
Groups
group
The group to enter. |
DecrementGroup(Groups group, uint64 size)
Decrements memory usage by a specific group.
Declaration
public static void DecrementGroup(Groups group, uint64 size)
Parameters
|
Groups
group
The group to update. |
|
uint64
size
The amount of memory freed (in bytes). |
Dump(const StringView& options=StringView::Empty)
Dumps the memory allocations stats (grouped).
Declaration
public static void Dump(const StringView& options=StringView::Empty)
Parameters
|
StringView
options
'all' to dump all groups, 'file' to dump info to a file (in Logs folder) |
EndGroup()
Leaves the last group context scope (by the current thread).
Declaration
public static void EndGroup()
GetGroupNames()
Gets the names of all groups (array matches Groups enums).
Declaration
public static Array<String, HeapAllocation> GetGroupNames()
Returns
|
Array<String, HeapAllocation>
|
GetGroups(int32 mode = 0)
Gets the memory stats for all groups (array matches Groups enums).
Declaration
public static GroupsArray GetGroups(int32 mode = 0)
Parameters
|
int32
mode
0 to get current memory, 1 to get peek memory, 2 to get current count. |
Returns
|
GroupsArray
|
IncrementGroup(Groups group, uint64 size)
Increments memory usage by a specific group.
Declaration
public static void IncrementGroup(Groups group, uint64 size)
Parameters
|
Groups
group
The group to update. |
|
uint64
size
The amount of memory allocated (in bytes). |
OnGroupUpdate(Groups group, int64 sizeDelta, int64 countDelta)
Declaration
public static void OnGroupUpdate(Groups group, int64 sizeDelta, int64 countDelta)
Parameters
|
Groups
group
|
|
int64
sizeDelta
|
|
int64
countDelta
|
OnMemoryAlloc(void* ptr, uint64 size)
Declaration
public static void OnMemoryAlloc(void* ptr, uint64 size)
Parameters
|
void
ptr
|
|
uint64
size
|
OnMemoryFree(void* ptr)
Declaration
public static void OnMemoryFree(void* ptr)
Parameters
|
void
ptr
|
RenameGroup(Groups group, const StringView& name)
Renames the group. Can be used for custom game/plugin groups naming.
Declaration
public static void RenameGroup(Groups group, const StringView& name)
Parameters
|
Groups
group
The group to update. |
|
StringView
name
The new name to set. |