I tried this out (macOS 26.3.1 on Apple Silicon/Rosetta) with a simple EXE that just called GetProcessMemoryInfo, and it reported "Failed to get swapped pages.". What might cause that? I also added a counter to see how many iterations the while loop was doing, at least in that failing case it's doing 680. I worry that applications might call `GetProcessMemoryInfo` or `GlobalMemoryStatusEx` a lot (maybe constantly?), and the overhead of that loop plus the `mach_vm_region_recurse` calls could really add up. Especially in a real app or game which would likely have more regions. Also, should we fill in `PeakVirtualSize` and `PeakPagefileUsage` (maybe just from the non-peak values if there's no other way to get them)? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9857#note_131419