Commit graph

12 commits

Author SHA1 Message Date
Nekotekina eec11bfba9 Move align helpers to util/asm.hpp
Also add some files:
GLTextureCache.cpp
VKTextureCache.cpp
2020-12-18 18:07:42 +03:00
Nekotekina fb29933d3d Add usz alias for std::size_t 2020-12-18 12:23:53 +03:00
Nekotekina e055d16b2c Replace verify() with ensure() with auto src location.
Expression ensure(x) returns x.
Using comma operator removed.
2020-12-09 15:43:38 +03:00
Nekotekina 2b674d4d8c utils::shm: allow 2M hugepages on demand 2020-11-25 10:41:17 +03:00
Nekotekina 487b572aa6 Linux: remove assertions on MADV_HUGEPAGE
It's a hint and is allowed to fail.
2020-11-25 10:41:17 +03:00
Nekotekina ab248e170c vm_native.cpp: add MADV_HUGEPAGE
It enables Transparend Huge Pages for some regions on Linux.
Although it can't be actively useful, it seems to do something.
Maybe it's even harmful for recompilers.
2020-11-24 12:31:11 +03:00
Nekotekina d1ee7c651f Make memory locking optional (mlock, VirtualLock).
Fix desired locking operation (to fix "sudo" memory).
It was discovered that some systems have outdated configuration.
With too tight limit, it's almost impossible to lock anything in memory.
2020-11-10 06:05:37 +03:00
Nekotekina dcbe8ef5f4 Import VirtualAlloc2 if available (Win10+)
Import MapViewOfFile3 as well.
Unused, this crap is tricky.
2020-11-10 03:04:38 +03:00
Nekotekina e98eb4659e Implement utils::memory_lock 2020-11-09 22:57:36 +03:00
Nekotekina d1988d384c vm: remove unnecessary memset() on stop 2020-11-09 22:57:36 +03:00
Nekotekina b05d12df0e Hotfix for shm->map_self()
Make sure mmap returns 64K-aligned results, as on Windows.
2020-11-08 22:15:59 +03:00
Nekotekina 1c99a2e7fb vm: add map_self() method to utils::shm
Add complementary unmap_self() method.
Move VirtualMemory to util/vm.hpp
Minor associated include cleanup.
Move asm.h to util/asm.hpp
2020-11-08 16:43:15 +03:00
Renamed from Utilities/VirtualMemory.cpp (Browse further)