aboutsummaryrefslogtreecommitdiff
path: root/src/common/host_memory.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [compat] fix solaris Qt build (#194)lizzie2025-08-151-19/+16
| | | | | | | | Co-authored-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/194 Reviewed-by: crueter <crueter@eden-emu.dev> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* [compat] fix solaris shm_open syscall causing crashes with SHM_ANON, ↵lizzie2025-08-021-12/+67
| | | | | | | | | implement portable posix shm_open_anon (#187) Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/187 Reviewed-by: crueter <crueter@eden-emu.dev> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* Revert "THIS NEEDS TO BE CHECKED BEFORE MERGE: RAII fix, initial MSAA, some ↵swurl2025-05-191-28/+3
| | | | | | fixes for memory misallocation (#116)" This reverts commit ce5d5d2aff50f9ce8159d609824eb2391bed9ef2.
* THIS NEEDS TO BE CHECKED BEFORE MERGE: RAII fix, initial MSAA, some fixes ↵MrPurple6662025-05-181-3/+28
| | | | | | | | | | | | | | | | | | | | for memory misallocation (#116) • MSAA Fixes: Fixes upload/download for MSAA textures using temporary non-MSAA images. Ensures compatibility with color formats and adds fallbacks for depth/stencil. • Memory fix misallocation: Adds checks for null/zero-length operations in memory management and improves cleanup to avoid crashes (Related to crash issues due to misallocation, RP5 and 865) • Vulkan Initialization (RAII): this almost rewrites the way vulkan initializes to avoid crashes, using a correct order now (thanks @crueter for the initial fix) •Please check before merging: - Test MSAA workflows (especially color/depth transitions and low memory cases). - Verify memory operations (e.g., unmapping zero-length regions). - Check Vulkan object lifetimes and platform-specific behavior. - Check others plataforms beyond android Why is everything in one PR? Otherwise, this is all a big fix, by checking the points above we can create a branch for each one and check them by themselves. I'm not standing still while I'm away, I'm just out of time for now. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/116 Co-authored-by: MrPurple666 <mrpurple666@noreply.localhost> Co-committed-by: MrPurple666 <mrpurple666@noreply.localhost>
* scope_exit: Make constexprFearlessTobi2024-02-191-2/+2
| | | | | Allows the use of the macro in constexpr-contexts. Also avoids some potential problems when nesting braces inside it.
* core: track separate heap allocation for linuxLiam2023-12-251-4/+6
|
* common: use memory holepunching when clearing memoryLiam2023-12-141-9/+29
|
* host_memory: move MAP_ALIGNED_SUPER attempt after de66cf5637abJan Beich2023-12-021-13/+11
| | | | | | src/common/host_memory.cpp:410:14: error: unused function 'ChooseVirtualBase' [-Werror,-Wunused-function] 410 | static void* ChooseVirtualBase(size_t virtual_size) { | ^~~~~~~~~~~~~~~~~
* host_memory: allow missing MAP_NORESERVE on FreeBSD after de66cf5637abJan Beich2023-12-021-0/+4
| | | | | | src/common/host_memory.cpp:408:47: error: use of undeclared identifier 'MAP_NORESERVE' MAP_PRIVATE | MAP_ANONYMOUS | MAP_NORESERVE, -1, 0); ^
* cmake: Move HAS_NCE to root cmakeGPUCode2023-11-291-1/+1
| | | | * So we can use it in common
* general: fix mac compileLiam2023-11-261-0/+2
|
* host_memory: Simplify randomness generationGPUCode2023-11-251-11/+2
|
* Address some review commentsGPUCode2023-11-251-0/+3
|
* android: Add cpu bakend gui toggleGPUCode2023-11-251-3/+3
|
* arm: Implement native code execution backendLiam2023-11-251-5/+5
|
* core: Respect memory permissions in MapGPUCode2023-11-251-12/+33
|
* host_memory: Switch to FreeRegionManagerLiam2023-11-251-29/+65
|
* host_memory: ensure map base is between 36 and 39 bitsLiam2023-11-251-2/+58
|
* Merge pull request #10508 from yuzu-emu/limebunnei2023-06-051-2/+10
|\ | | | | Project Lime - yuzu Android Port
| * common: host_memory: Implement for Android.bunnei2023-06-031-2/+10
| |
* | host_memory: merge adjacent placeholder mappings on Linuxkkoniuszy2023-06-011-0/+22
|/ | | | | | | | | | | | 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.
* general: fix spelling mistakesLiam2023-03-121-2/+2
|
* host_memory: Use transparent huge pages where availableMerry2023-01-011-0/+15
|
* host_memory: Allocate virtual_base with MAP_NORESERVEMerry2023-01-011-2/+2
| | | | | Specify that we do not require swap to be reserved for this address range; allow overcommitting.
* Initial ARM64 supportLiam2022-11-091-0/+6
|
* general: Convert source file copyright comments over to SPDXMorph2022-04-231-3/+2
| | | | | 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.
* common: Replace lock_guard with scoped_lockMerry2022-04-071-2/+2
|
* general: Fix clang/gcc build errorsameerj2022-03-201-0/+1
|
* common: Reduce unused includesameerj2022-03-191-1/+0
|
* host_memory: Fix fastmem crashes in debug buildsMorph2022-03-021-2/+2
| | | | | | 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>
* general: Add missing copyright noticesameerj2021-12-051-0/+4
|
* Fixed invalid iterator usageAndrew Strelsky2021-09-291-1/+1
|
* host_memory: Add workaround for FreeBSD 12Jan Beich2021-07-271-0/+5
| | | | | | | src/common/host_memory.cpp:360:14: error: use of undeclared identifier 'memfd_create' fd = memfd_create("HostMemory", 0); ^
* host_memory: Enable Linux implementation on FreeBSDJan Beich2021-07-271-2/+2
| | | | HW.Memory <Critical> common/host_memory.cpp:HostMemory:492: Fastmem unavailable, falling back to VirtualBuffer for memory allocation
* host_memory: Correct MEM_RESERVE_PLACEHOLDERlat9nq2021-06-191-1/+1
| | | | | Microsoft defines `MEM_RESERVE_PLACEHOLDER` as `0x00040000`, but our manually imported version of it drops the last zero.
* common/host_memory: Implement a fallback if fastmem fails.Markus Wick2021-06-111-14/+45
| | | | | | 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.
* common/host_shader: Load Windows 10 functions dynamicallyReinUsesLisp2021-06-111-29/+88
| | | | Workaround old headers and libraries shipped on MinGW.
* host_memory: Support staged VirtualProtect callsReinUsesLisp2021-06-111-3/+12
|
* common/host_memory: Optimize for huge tables.Markus Wick2021-06-111-10/+19
| | | | | 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.
* common/host_memory: Add Linux implementationMarkus Wick2021-06-111-10/+120
|
* common/host_memory: Add interface and Windows implementationReinUsesLisp2021-06-111-0/+320