- //得到总的内存容量,单位Byte
- ULONGLONG GetMemorySize()
- {
- MEMORYSTATUSEX mem_stat={sizeof(MEMORYSTATUSEX)};
- GlobalMemoryStatusEx(&mem_stat);
- return mem_stat.ullTotalPhys;
- }
- //该片段来自于http://www.codesnippet.cn/detail/250420133037.html
来源: http://www.codesnippet.cn/detail/250420133037.html