Add ignoring memory allocations from profiling tools in Editor Profiler
This commit is contained in:
@@ -24,6 +24,17 @@ namespace FlaxEngine
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public unsafe bool NameStartsWith(string prefix)
|
||||||
|
{
|
||||||
|
fixed (char* name = &Name0)
|
||||||
|
{
|
||||||
|
fixed (char* p = prefix)
|
||||||
|
{
|
||||||
|
return Utils.MemoryCompare(new IntPtr(name), new IntPtr(p), (ulong)(prefix.Length * 2)) == 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,6 +72,8 @@ namespace FlaxEditor.Windows.Profiler
|
|||||||
for (int j = 0; j < ee.Length; j++)
|
for (int j = 0; j < ee.Length; j++)
|
||||||
{
|
{
|
||||||
ref var e = ref ee[j];
|
ref var e = ref ee[j];
|
||||||
|
if (e.NameStartsWith("ProfilerWindow"))
|
||||||
|
continue;
|
||||||
nativeMemoryAllocation += e.NativeMemoryAllocation;
|
nativeMemoryAllocation += e.NativeMemoryAllocation;
|
||||||
managedMemoryAllocation += e.ManagedMemoryAllocation;
|
managedMemoryAllocation += e.ManagedMemoryAllocation;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user