Memorystatusex Statex;
statex.dwlength = sizeof (Statex);
GlobalMemoryStatusEx (&statex);
_tprintf (TEXT ("There is%*ld percent of memory in use.\n"),
WIDTH, Statex.dwmemoryload);
_tprintf (TEXT ("There is%*i64d total KB of physical memory.\n"),
WIDTH, Statex.ulltotalphys/div);
_tprintf (TEXT ("There is%*i64d free KB of physical memory.\n"),
WIDTH, Statex.ullavailphys/div);
_tprintf (TEXT ("There is%*i64d total KB of paging file.\n"),
WIDTH, Statex.ulltotalpagefile/div);
_tprintf (TEXT ("There is%*i64d free KB of Paging file.\n"),
WIDTH, Statex.ullavailpagefile/div);
_tprintf (TEXT ("There is%*i64d total KB of Virtual memory.\n"),
WIDTH, Statex.ulltotalvirtual/div);
_tprintf (TEXT ("There is%*i64d free KB of Virtual memory.\n"),
WIDTH, Statex.ullavailvirtual/div);
Show The amount of extended memory available.
_tprintf (TEXT ("There is%*i64d free KB of Extended memory.\n"),
WIDTH, Statex.ullavailextendedvirtual/div);
Windows view Memory