Add Extra Development Memory access and log on start

This commit is contained in:
Wojtek Figat
2025-03-05 13:43:15 +01:00
parent 06729f6b62
commit 196ada5710
3 changed files with 8 additions and 1 deletions

View File

@@ -175,6 +175,9 @@ void PlatformBase::LogInfo()
LOG(Info, "Physical Memory: {0} total, {1} used ({2}%)", Utilities::BytesToText(memStats.TotalPhysicalMemory), Utilities::BytesToText(memStats.UsedPhysicalMemory), Utilities::RoundTo2DecimalPlaces((float)memStats.UsedPhysicalMemory * 100.0f / (float)memStats.TotalPhysicalMemory));
LOG(Info, "Virtual Memory: {0} total, {1} used ({2}%)", Utilities::BytesToText(memStats.TotalVirtualMemory), Utilities::BytesToText(memStats.UsedVirtualMemory), Utilities::RoundTo2DecimalPlaces((float)memStats.UsedVirtualMemory * 100.0f / (float)memStats.TotalVirtualMemory));
LOG(Info, "Program Size: {0}", Utilities::BytesToText(memStats.ProgramSizeMemory));
#if !BUILD_RELEASE && !PLATFORM_DESKTOP
LOG(Info, "Extra Development Memory: {0}", Utilities::BytesToText(memStats.ExtraDevelopmentMemory));
#endif
LOG(Info, "Main thread id: 0x{0:x}, Process id: {1}", Globals::MainThreadID, Platform::GetCurrentProcessId());
LOG(Info, "Desktop size: {0}", Platform::GetDesktopSize());

View File

@@ -6,7 +6,6 @@
#include "Engine/Platform/Window.h"
#include "Engine/Platform/CreateWindowSettings.h"
#include "Engine/Platform/WindowsManager.h"
#include "Engine/Platform/MemoryStats.h"
#include "Engine/Platform/BatteryInfo.h"
#include "Engine/Platform/Base/PlatformUtils.h"
#include "Engine/Profiler/ProfilerCPU.h"

View File

@@ -35,6 +35,11 @@ API_STRUCT(NoDefault) struct MemoryStats
/// Amount of memory used initially by the program data (executable code, exclusive shared libraries and global static data sections).
/// </summary>
API_FIELD() uint64 ProgramSizeMemory = 0;
/// <summary>
/// Amount of extra memory assigned by the platform for development. Only used on platforms with fixed memory and no paging.
/// </summary>
API_FIELD() uint64 ExtraDevelopmentMemory = 0;
};
/// <summary>