refactored getTotalSystemMemory a bit, just to make it easy to extend it
_SC_AVPHYS_PAGES doesn't exist in Mac OS X