Add memory profiling events to the main areas of the engine
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#include "Engine/Content/Deprecated.h"
|
||||
#include "Engine/Engine/EngineService.h"
|
||||
#include "Engine/Profiler/ProfilerCPU.h"
|
||||
#include "Engine/Profiler/ProfilerMemory.h"
|
||||
#include "Engine/Serialization/Serialization.h"
|
||||
#include <ThirdParty/recastnavigation/DetourNavMesh.h>
|
||||
#include <ThirdParty/recastnavigation/RecastAlloc.h>
|
||||
@@ -93,6 +94,7 @@ NavMeshRuntime* NavMeshRuntime::Get(const NavMeshProperties& navMeshProperties,
|
||||
if (!result && createIfMissing)
|
||||
{
|
||||
// Create a new navmesh
|
||||
PROFILE_MEM(Navigation);
|
||||
result = New<NavMeshRuntime>(navMeshProperties);
|
||||
NavMeshes.Add(result);
|
||||
}
|
||||
@@ -178,16 +180,20 @@ NavigationService NavigationServiceInstance;
|
||||
|
||||
void* dtAllocDefault(size_t size, dtAllocHint)
|
||||
{
|
||||
PROFILE_MEM(Navigation);
|
||||
return Allocator::Allocate(size);
|
||||
}
|
||||
|
||||
void* rcAllocDefault(size_t size, rcAllocHint)
|
||||
{
|
||||
PROFILE_MEM(Navigation);
|
||||
return Allocator::Allocate(size);
|
||||
}
|
||||
|
||||
NavigationSettings::NavigationSettings()
|
||||
{
|
||||
PROFILE_MEM(Navigation);
|
||||
|
||||
// Init navmeshes
|
||||
NavMeshes.Resize(1);
|
||||
auto& navMesh = NavMeshes[0];
|
||||
|
||||
Reference in New Issue
Block a user