mirror of
https://github.com/InoriRus/Kyty.git
synced 2026-08-28 13:16:40 +00:00
more APIs
This commit is contained in:
@@ -6,7 +6,10 @@
|
||||
#include "Emulator/Jit.h"
|
||||
#include "Emulator/Profiler.h"
|
||||
|
||||
#include <new>
|
||||
#include "cpuinfo.h"
|
||||
|
||||
//#include <atomic>
|
||||
//#include <new>
|
||||
|
||||
// NOLINTNEXTLINE
|
||||
//#define NTDDI_VERSION 0x0A000005
|
||||
@@ -52,6 +55,12 @@ SystemInfo GetSystemInfo()
|
||||
ret.ProcessorLevel = system_info.wProcessorLevel;
|
||||
ret.ProcessorRevision = system_info.wProcessorRevision;
|
||||
|
||||
const auto* p = cpuinfo_get_package(0);
|
||||
|
||||
EXIT_IF(p == nullptr);
|
||||
|
||||
ret.ProcessorName = String::FromUtf8(p->name);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -280,6 +289,11 @@ static VirtualMemory::Mode get_protection_flag(DWORD mode)
|
||||
}
|
||||
}
|
||||
|
||||
void Init()
|
||||
{
|
||||
cpuinfo_initialize();
|
||||
}
|
||||
|
||||
uint64_t Alloc(uint64_t address, uint64_t size, Mode mode)
|
||||
{
|
||||
auto ptr = reinterpret_cast<uintptr_t>(VirtualAlloc(reinterpret_cast<LPVOID>(static_cast<uintptr_t>(address)), size,
|
||||
|
||||
Reference in New Issue
Block a user