Liam
1075c88dca
common: use memory holepunching when clearing memory
2 years ago
Jan Beich
d4e8540135
host_memory: move MAP_ALIGNED_SUPER attempt after de66cf5637
src/common/host_memory.cpp:410:14: error: unused function 'ChooseVirtualBase' [-Werror,-Wunused-function]
410 | static void* ChooseVirtualBase(size_t virtual_size) {
| ^~~~~~~~~~~~~~~~~
2 years ago
Jan Beich
6ab3d70252
host_memory: allow missing MAP_NORESERVE on FreeBSD after de66cf5637
src/common/host_memory.cpp:408:47: error: use of undeclared identifier 'MAP_NORESERVE'
MAP_PRIVATE | MAP_ANONYMOUS | MAP_NORESERVE, -1, 0);
^
2 years ago
GPUCode
fab81ee39d
cmake: Move HAS_NCE to root cmake
* So we can use it in common
2 years ago
Liam
82c5e2472e
general: fix mac compile
2 years ago
GPUCode
064d5bf4aa
host_memory: Simplify randomness generation
2 years ago
GPUCode
3814ca9d84
Address some review comments
2 years ago
GPUCode
3764cc4be2
android: Add cpu bakend gui toggle
2 years ago
Liam
19619b1b14
arm: Implement native code execution backend
2 years ago
GPUCode
2590906d14
core: Respect memory permissions in Map
2 years ago
Liam
0dc5c75243
host_memory: Switch to FreeRegionManager
2 years ago
Liam
de66cf5637
host_memory: ensure map base is between 36 and 39 bits
2 years ago
bunnei
699d6751d8
common: host_memory: Implement for Android.
3 years ago
kkoniuszy
802d30d421
host_memory: merge adjacent placeholder mappings on Linux
Track the private anonymous placeholder mappings created by Unmap() and
wherever possible, replace existing placeholders with larger ones
instead of creating many small ones.
This helps with the buildup of mappings in /proc/YUZU_PID/maps after a
longer gaming session, improving stability without having to increase
vm.max_map_count to a ridiculous value. The amount of placeholder
mappings will no longer outgrow the amount of actual memfd mappings in
cases of high memory fragmentation.
3 years ago
Liam
5be8a74b0c
general: fix spelling mistakes
3 years ago
Merry
0abd0d6af9
host_memory: Use transparent huge pages where available
3 years ago
Merry
192f349e5f
host_memory: Allocate virtual_base with MAP_NORESERVE
Specify that we do not require swap to be reserved for this address range;
allow overcommitting.
3 years ago
Liam
9509fb30a4
Initial ARM64 support
3 years ago
Morph
2b87305d31
general: Convert source file copyright comments over to SPDX
This formats all copyright comments according to SPDX formatting guidelines.
Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
4 years ago
Merry
ae642bbff2
common: Replace lock_guard with scoped_lock
4 years ago
ameerj
f9709bb9e9
general: Fix clang/gcc build errors
4 years ago
ameerj
e70b4f3fc5
common: Reduce unused includes
4 years ago
Morph
5ea520a149
host_memory: Fix fastmem crashes in debug builds
It is possible for virtual_offset to not be 0 when the iterator is at the beginning, and thus, std::prev(it) may be evaluated, leading to a crash in debug mode.
Co-Authored-By: Fernando S. <1731197+FernandoS27@users.noreply.github.com>
4 years ago
ameerj
8969273d2d
general: Add missing copyright notices
4 years ago
Andrew Strelsky
a24aa6e5bd
Fixed invalid iterator usage
4 years ago
Jan Beich
471ddd0674
host_memory: Add workaround for FreeBSD 12
src/common/host_memory.cpp:360:14: error: use of undeclared identifier
'memfd_create'
fd = memfd_create("HostMemory", 0);
^
5 years ago
Jan Beich
112a8e017d
host_memory: Enable Linux implementation on FreeBSD
HW.Memory <Critical> common/host_memory.cpp:HostMemory:492: Fastmem unavailable, falling back to VirtualBuffer for memory allocation
5 years ago
lat9nq
bee420dcfb
host_memory: Correct MEM_RESERVE_PLACEHOLDER
Microsoft defines `MEM_RESERVE_PLACEHOLDER` as `0x00040000`, but our
manually imported version of it drops the last zero.
5 years ago
Markus Wick
161ade6da0
common/host_memory: Implement a fallback if fastmem fails.
This falls back to the old approach of using a virtual buffer.
Windows is untested, but this build should fix support for Windows < 10 v1803. However without fastmem support at all.
5 years ago
ReinUsesLisp
f664a4d4c1
common/host_shader: Load Windows 10 functions dynamically
Workaround old headers and libraries shipped on MinGW.
5 years ago
ReinUsesLisp
f36a769085
host_memory: Support staged VirtualProtect calls
5 years ago
Markus Wick
8d2a08553e
common/host_memory: Optimize for huge tables.
In theory, if we have 2 MB continously mapped, this should save one layer of TLB.
Let's make it at least more likely by aligning the memory.
5 years ago
Markus Wick
9a4cec64e1
common/host_memory: Add Linux implementation
5 years ago
ReinUsesLisp
1f0491900b
common/host_memory: Add interface and Windows implementation
5 years ago