Initial new PPU interpreter implementation

Replaced dangerous offset32 usages with safe OFFSET_OF macro
This commit is contained in:
DH 2025-04-24 13:41:04 +03:00
parent dcc965c2bb
commit 7115851c82
81 changed files with 13791 additions and 5398 deletions

View file

@ -188,16 +188,19 @@ namespace utils
{
static const long r = []() -> long
{
long result;
#ifdef _WIN32
SYSTEM_INFO info;
::GetSystemInfo(&info);
return info.dwPageSize;
result = info.dwPageSize;
#else
return ::sysconf(_SC_PAGESIZE);
result = ::sysconf(_SC_PAGESIZE);
#endif
ensure(result, FN(((x & (x - 1)) == 0 && x > 0 && x <= 0x10000)));
return result;
}();
return ensure(r, FN(((x & (x - 1)) == 0 && x > 0 && x <= 0x10000)));
return r;
}
// Convert memory protection (internal)