Files
Xenia-Canary/src/xenia/cpu
Herman S. bf6e1a81eb [Posix] Fix DeallocFixed crashes / memory leaks
BaseHeap::Dispose() walks the page table and calls
DeallocFixed(addr, 0, kRelease) for every allocated page region.
These addresses are within file-backed view mappings (i.e. guest memory).
On Windows, VirtualFree on file-mapped pages silently returns FALSE.
On POSIX, the code hit assert_always() and crashed. Changed to return false
to match Windows behavior.

Memory leaks from munmap(addr, 0):

Callers passed length=0 to DeallocFixed(kRelease). On Windows this works because
VirtualFree(addr, 0, MEM_RELEASE) means "release the entire region" — Windows
ignores the length parameter for MEM_RELEASE and always frees the whole
allocation. On POSIX, munmap(addr, 0) fails with EINVAL, so the memory was
silently leaked every time.
2026-03-09 13:43:56 +09:00
..
2025-07-19 14:42:21 -07:00
2025-07-19 14:42:21 -07:00
2025-07-19 14:42:21 -07:00
2020-04-07 16:09:41 -05:00
2020-04-07 16:09:41 -05:00
2018-11-24 16:21:06 -06:00
2025-07-19 14:42:21 -07:00
2025-07-19 14:42:21 -07:00
2020-04-07 16:09:41 -05:00
2020-04-07 16:09:41 -05:00
2020-04-07 16:09:41 -05:00
2015-12-29 12:32:46 -08:00
2025-07-19 14:42:21 -07:00