May 27, 2026
10:54 a.m.
On Wed May 27 10:46:03 2026 +0000, Hans Leidekker wrote:
ullTotalVirtual is supposed to be 2 or 3GB for 32-bit processes. How does this cause overflow? If we're switching to ullTotalPageFile, shouldn't we add the amount of physical memory (ullTotalPhys)? That's how MSDN defines TotalVirtualMemorySize. .NET expects the value to fit into 32 bits in 64-bit application.
`TotalVirtualMemorySize` can be computed as `TotalVisibleMemorySize + SizeStoredInPagingFiles`. We don't implement `SizeStoredInPagingFiles` but when we do we will need to implement it as (`status.ullTotalPageFile - status.ullTotalPhys) / 1024` due to how `GlobalMemoryStatusEx` works. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11007#note_141415