$ sysctl hw.memsize
hw.memsize: 8589934592

Exit code: 0