windows 查看内存
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 are %*I64d total KB of physical memory.\n"),
WIDTH, statex.ullTotalPhys/DIV);
_tprintf (TEXT("There are %*I64d free KB of physical memory.\n"),
WIDTH, statex.ullAvailPhys/DIV);
_tprintf (TEXT("There are %*I64d total KB of paging file.\n"),
WIDTH, statex.ullTotalPageFile/DIV);
_tprintf (TEXT("There are %*I64d free KB of paging file.\n"),
WIDTH, statex.ullAvailPageFile/DIV);
_tprintf (TEXT("There are %*I64d total KB of virtual memory.\n"),
WIDTH, statex.ullTotalVirtual/DIV);
_tprintf (TEXT("There are %*I64d free KB of virtual memory.\n"),
WIDTH, statex.ullAvailVirtual/DIV);
// Show the amount of extended memory available.
_tprintf (TEXT("There are %*I64d free KB of extended memory.\n"),
WIDTH, statex.ullAvailExtendedVirtual/DIV);
windows 查看内存
,温馨提示: 本文由Jm博客推荐,转载请保留链接: https://www.jmwww.net/file/71127.html
- 上一篇:解决Windows服务修改配置文件后必须重启的问题
- 下一篇:C# List 去重