Commit 33c0e58a authored by boliu's avatar boliu Committed by Commit bot

build: Fix getting available memory on mac

BUG=641343

Review-Url: https://codereview.chromium.org/2289963002
Cr-Commit-Position: refs/heads/master@{#415205}
parent 3a73cc0c
......@@ -42,7 +42,7 @@ def _GetTotalMemoryInBytes():
return float(match.group(1)) * 2**10
elif sys.platform == 'darwin':
try:
avail_bytes = int(subprocess.check_output(['sysctl', '-n', 'hw.memsize']))
return int(subprocess.check_output(['sysctl', '-n', 'hw.memsize']))
except Exception:
return 0
# TODO(scottmg): Implement this for other platforms.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment