Hello,
I noticed Windows 10 GlobalMemoryStatusEx function started reporting a smaller ullAvailVirtual value for the same x64 program.
On Windows 10 ver. 1607 (10.0.14393), ullAvailVirtual = 140,737,471,442,944 bytes
On Windows 10 ver. 1909 (10.0.18363), ullAvailVirtual = 140,733,079,748,608 bytes
Comparing them, the latter reports a smaller ullAvailVirtual by 4,391,694,336 bytes (~4 GB).
On the other hand, the both versions report the same ullTotalVirtual = 140,737,488,224,256 bytes
Since Virtual Bytes are calculated as ullTotalVirtual - ullAvailVirtual, memory tools such as 'perfmon.exe' started reporting a larger Virtual Bytes by ~4 GB.
Also, .NET method: System.Diagnostics.Process.GetCurrentProcess().VirtualMemorySize64 started reporting a larger Virtual Bytes.
'VMMap.exe' reports it as 'Private Data - Thread Environment Block'.
My questions are:
What is the purpose of lowering 'ullAvailVirtual' on Windows 1909?
Is this caused by a system setting or configuration?
If it is, which system setting or configuration affects it?
Replication steps:
Build (x64) and run the program below on Windows 10 ver. 1607 and 1909 systems to see the difference.
Replication code (C++):
#include <iostream>
#include <string>
#include <Windows.h>
int main()
{
MEMORYSTATUSEX memStatusEx;
memStatusEx.dwLength = sizeof(memStatusEx);
BOOL succeeds = GlobalMemoryStatusEx(&memStatusEx);
if (succeeds)
{
DWORDLONG totalVirtual = memStatusEx.ullTotalVirtual;
DWORDLONG availVirtual = memStatusEx.ullAvailVirtual;
std::cout << "totalVirtual=" << totalVirtual << "\n";
std::cout << "availVirtual=" << availVirtual << "\n";
DWORDLONG virtualBytes = totalVirtual - availVirtual;
std::cout << "virtualBytes=" << virtualBytes << "\n";
}
std::cout << "Press enter to close\n";
std::cin.ignore();
}