diff options
author | Liam <byteslice@airmail.cc> | 2022-11-06 22:45:36 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2022-11-09 22:58:49 +0100 |
commit | cbaf642ffe4b05f8796798ebdc5c6892605928cc (patch) | |
tree | 8ac4094f709da71b334c152e111247c89c958cee /src/common/host_memory.cpp | |
parent | Merge pull request #9215 from liamwhite/swordfight (diff) | |
download | yuzu-cbaf642ffe4b05f8796798ebdc5c6892605928cc.tar yuzu-cbaf642ffe4b05f8796798ebdc5c6892605928cc.tar.gz yuzu-cbaf642ffe4b05f8796798ebdc5c6892605928cc.tar.bz2 yuzu-cbaf642ffe4b05f8796798ebdc5c6892605928cc.tar.lz yuzu-cbaf642ffe4b05f8796798ebdc5c6892605928cc.tar.xz yuzu-cbaf642ffe4b05f8796798ebdc5c6892605928cc.tar.zst yuzu-cbaf642ffe4b05f8796798ebdc5c6892605928cc.zip |
Diffstat (limited to '')
-rw-r--r-- | src/common/host_memory.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/common/host_memory.cpp b/src/common/host_memory.cpp index 7f9659612..909f6cf3f 100644 --- a/src/common/host_memory.cpp +++ b/src/common/host_memory.cpp @@ -359,6 +359,12 @@ public: } }); + long page_size = sysconf(_SC_PAGESIZE); + if (page_size != 0x1000) { + LOG_CRITICAL(HW_Memory, "page size {:#x} is incompatible with 4K paging", page_size); + throw std::bad_alloc{}; + } + // Backing memory initialization #if defined(__FreeBSD__) && __FreeBSD__ < 13 // XXX Drop after FreeBSD 12.* reaches EOL on 2024-06-30 |