PHP Code:
#include <windows.h>
#include <stdio.h>
int main()
{
MEMORYSTATUS MemStat;
GlobalMemoryStatus( &MemStat );
printf( "%ld %% of Memory in use.\n", MemStat.dwMemoryLoad );
printf( "\n" );
printf( "%ld bytes of physical memory.\n", MemStat.dwTotalPhys );
printf( "%ld bytes of physical memory available.\n", MemStat.dwAvailPhys );
printf( "\n" );
printf( "%ld bytes of pagefile memory.\n", MemStat.dwTotalPageFile );
printf( "%ld bytes of pagefile memory available.\n", MemStat.dwAvailPageFile );
printf( "Note that this number does not represent the actual physical size of the paging file on disk.\n" );
printf( "\n" );
printf( "%ld bytes of virtual memory.\n", MemStat.dwTotalVirtual );
printf( "%ld bytes of virtual memory available.\n", MemStat.dwAvailVirtual );
return 0;
}