Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(258)

Unified Diff: pylib/gyp/generator/ninja.py

Issue 17087010: Make the ninja pool math correct. (Closed) Base URL: http://gyp.googlecode.com/svn/trunk
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pylib/gyp/generator/ninja.py
diff --git a/pylib/gyp/generator/ninja.py b/pylib/gyp/generator/ninja.py
index 423b8c7d40292007314b4272e7e725185eb2c493..9b30c3bb623ca791c9f587af174cd36a4d15c2c6 100644
--- a/pylib/gyp/generator/ninja.py
+++ b/pylib/gyp/generator/ninja.py
@@ -1361,7 +1361,7 @@ def GetDefaultConcurrentLinks():
stat.dwLength = ctypes.sizeof(stat)
ctypes.windll.kernel32.GlobalMemoryStatusEx(ctypes.byref(stat))
- return max(1, stat.ullTotalPhys / (4 ** 31))
+ return max(1, stat.ullTotalPhys / (4 * (2 ** 30))) # total / 4GB
else:
# TODO(scottmg): Implement this for other platforms.
return 1
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698