Fix Platform::GetCacheLineSize to be deprecated in favor of CPUInfo
This commit is contained in:
@@ -709,11 +709,6 @@ CPUInfo AndroidPlatform::GetCPUInfo()
|
||||
return AndroidCpu;
|
||||
}
|
||||
|
||||
int32 AndroidPlatform::GetCacheLineSize()
|
||||
{
|
||||
return AndroidCpu.CacheLineSize;
|
||||
}
|
||||
|
||||
MemoryStats AndroidPlatform::GetMemoryStats()
|
||||
{
|
||||
const uint64 pageSize = getpagesize();
|
||||
|
||||
@@ -81,7 +81,6 @@ public:
|
||||
}
|
||||
static bool Is64BitPlatform();
|
||||
static CPUInfo GetCPUInfo();
|
||||
static int32 GetCacheLineSize();
|
||||
static MemoryStats GetMemoryStats();
|
||||
static ProcessMemoryStats GetProcessMemoryStats();
|
||||
static uint64 GetCurrentThreadID()
|
||||
|
||||
@@ -134,11 +134,6 @@ CPUInfo ApplePlatform::GetCPUInfo()
|
||||
return Cpu;
|
||||
}
|
||||
|
||||
int32 ApplePlatform::GetCacheLineSize()
|
||||
{
|
||||
return Cpu.CacheLineSize;
|
||||
}
|
||||
|
||||
MemoryStats ApplePlatform::GetMemoryStats()
|
||||
{
|
||||
MemoryStats result;
|
||||
|
||||
@@ -67,7 +67,6 @@ public:
|
||||
}
|
||||
static bool Is64BitPlatform();
|
||||
static CPUInfo GetCPUInfo();
|
||||
static int32 GetCacheLineSize();
|
||||
static MemoryStats GetMemoryStats();
|
||||
static ProcessMemoryStats GetProcessMemoryStats();
|
||||
static uint64 GetCurrentThreadID();
|
||||
|
||||
@@ -257,6 +257,11 @@ bool PlatformBase::Is64BitApp()
|
||||
#endif
|
||||
}
|
||||
|
||||
int32 PlatformBase::GetCacheLineSize()
|
||||
{
|
||||
return (int32)Platform::GetCPUInfo().CacheLineSize;
|
||||
}
|
||||
|
||||
void PlatformBase::Fatal(const Char* msg, void* context)
|
||||
{
|
||||
// Check if is already during fatal state
|
||||
|
||||
@@ -357,9 +357,10 @@ public:
|
||||
|
||||
/// <summary>
|
||||
/// Gets the CPU cache line size.
|
||||
/// [Deprecated in v1.10]
|
||||
/// </summary>
|
||||
/// <returns>The cache line size.</returns>
|
||||
API_PROPERTY() static int32 GetCacheLineSize() = delete;
|
||||
API_PROPERTY() DEPRECATED("Use CacheLineSize field from CPUInfo.") static int32 GetCacheLineSize();
|
||||
|
||||
/// <summary>
|
||||
/// Gets the current memory stats.
|
||||
|
||||
@@ -1766,11 +1766,6 @@ CPUInfo LinuxPlatform::GetCPUInfo()
|
||||
return UnixCpu;
|
||||
}
|
||||
|
||||
int32 LinuxPlatform::GetCacheLineSize()
|
||||
{
|
||||
return UnixCpu.CacheLineSize;
|
||||
}
|
||||
|
||||
MemoryStats LinuxPlatform::GetMemoryStats()
|
||||
{
|
||||
// Get memory usage
|
||||
|
||||
@@ -95,7 +95,6 @@ public:
|
||||
}
|
||||
static bool Is64BitPlatform();
|
||||
static CPUInfo GetCPUInfo();
|
||||
static int32 GetCacheLineSize();
|
||||
static MemoryStats GetMemoryStats();
|
||||
static ProcessMemoryStats GetProcessMemoryStats();
|
||||
static uint64 GetCurrentThreadID()
|
||||
|
||||
@@ -304,11 +304,6 @@ CPUInfo Win32Platform::GetCPUInfo()
|
||||
return CpuInfo;
|
||||
}
|
||||
|
||||
int32 Win32Platform::GetCacheLineSize()
|
||||
{
|
||||
return CpuInfo.CacheLineSize;
|
||||
}
|
||||
|
||||
MemoryStats Win32Platform::GetMemoryStats()
|
||||
{
|
||||
// Get memory stats
|
||||
|
||||
@@ -90,7 +90,6 @@ public:
|
||||
static void FreePages(void* ptr);
|
||||
static bool Is64BitPlatform();
|
||||
static CPUInfo GetCPUInfo();
|
||||
static int32 GetCacheLineSize();
|
||||
static MemoryStats GetMemoryStats();
|
||||
static ProcessMemoryStats GetProcessMemoryStats();
|
||||
static uint64 GetCurrentProcessId();
|
||||
|
||||
Reference in New Issue
Block a user