aboutsummaryrefslogtreecommitdiff
path: root/src/common/sparse_large_vector.cpp
Commit message (Collapse)AuthorAgeFilesLines
* common: forget a sparse vector's region when it is freedTakoroka2 days1-3/+4
| | | | | | | | Regions are kept in host pages but were looked up by byte address when freed, so none was ever removed, and the fault handler kept matching faults in released address ranges (and in the page after each region, as the end was treated as inclusive).
* Fix build with MSVC 14.51 (VS 2026)Takoroka8 days1-1/+1
| | | | | | | - sparse_large_vector: ULONG_PTR -> u64 needs static_cast, not reinterpret_cast - zbic_compression: silence C4505/C5245 for the amalgamated zstd.c, which is compiled as project code and hits /we4505 - launch_params: explicit int -> bool (C4800 is an error here)
* [common/sparse_large_vector] correct Win32 exception handler (#4481)Exverge2026-09-261-17/+33
| | | | | | | | | | | | | | | - [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions). - [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md) - [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability. ------------------- Adds mutex to prevent multiple threads from accessing the vector at the same time and corrects the Windows exception handler to use the correct faulting address used by the exception handler (previously used the instruction address instead of the fault address) and properly shifts the stored values for the handler. Fixes weird compiler-specific bugs on Windows Co-authored-by: bruno <protoxseven@gmail.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4481 Reviewed-by: lizzie <lizzie@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
* [common/sparse_large_vector] decommit unused pages + fix first page in ↵Exverge2026-09-231-0/+15
| | | | | | | | | | | | | | | zeroed region (#4471) - [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions). - [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md) - [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability. ------------------- Fixes a bug where the first page of a zeroed out region would not be properly zeroed, and now frees unused memory. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4471 Reviewed-by: lizzie <lizzie@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev>
* [common/core/dynarmic] Optimize page table allocations (#4219)Exverge2026-09-091-0/+143
Reduces the page entries from 32 bytes to 8 and rewrites `VirtualBuffer` to be more efficient in memory usage and specifically for large zero regions. The page table will now only reserve 1GiB instead of 4GiB and of this memory it should only use at most ~8MiB. This PR has the side effect of using Eden on Windows on low memory systems much more plausible since it would previously require ~10GiB of committable memory at front (despite using ~5-6 at most, inadvertently stalling other processes) where as now it should only require around the amount that it'll actually use. Co-authored-by: Lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4219 Reviewed-by: Maufeat <sahyno1996@gmail.com> Reviewed-by: lizzie <lizzie@eden-emu.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>