#include <windows.h>
#define DIV 1024
char *divisor = "K";
void
main(int argc, char *argv[])
{
MEMORYSTATUS stat;
GlobalMemoryStatus (&stat);
printf ("The MEMORYSTATUS structure is %ld bytes long.\n",
stat.dwLength);
printf ("It should be %d.\n", sizeof (stat));
printf ("There is %ld percent of memory in use.\n",
stat.dwMemoryLoad);
printf ("There are %ld total %sbytes of physical memory.\n",
stat.dwTotalPhys/DIV, divisor);
printf ("There are %ld free %sbytes of physical memory.\n",
stat.dwAvailPhys/DIV, divisor);
printf ("There are %ld total %sbytes of paging file.\n",
stat.dwTotalPageFile/DIV, divisor);
printf ("There are %ld free %sbytes of paging file.\n",
stat.dwAvailPageFile/DIV, divisor);
printf ("There are %ld total %sbytes of virtual memory.\n",
stat.dwTotalVirtual/DIV, divisor);
printf ("There are %ld free %sbytes of virtual memory.\n",
stat.dwAvailVirtual/DIV, divisor);
}
'이것저것 > My_Work' 카테고리의 다른 글
MFC - 콤보박스 (2) | 2008.10.08 |
---|---|
[MFC] Tab 컨트롤에 모달리스창 넣기 (1) | 2008.09.30 |
[MFC] - 시스템의 전원 / 베터리 정보 가져오기 (2) | 2008.09.11 |
최대 절전 모드 오류 (0) | 2008.09.11 |
[MFC] - Power Policy Scheme (0) | 2008.09.10 |