You can use the GlobalMemoryStatusEx() from the Win32 API to get the total memory.
Here is something I wrote for DBP using IanM's Matrix plugins.
#Constant Kernel32DLL=1
MEMORYSTATUSEX=alloc zeroed(64)
poke integer MEMORYSTATUSEX,64 ` Size of MEMORYSTATUSEX
load dll "Kernel32.dll",Kernel32DLL
call dll Kernel32DLL,"GlobalMemoryStatusEx",MEMORYSTATUSEX
inc MEMORYSTATUSEX,8 ` Offset by 8 bytes
TotalPhys as double integer
TotalPhys=peek double integer(MEMORYSTATUSEX)
print TotalPhys
wait key
free MEMORYSTATUSEX
end
http://3dfolio.com