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

Unified Diff: Source/wtf/PageAllocator.cpp

Issue 717263005: Re-land: 178586 Avoid fragmenting address space on small windows systems. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: ASSERT_NOT_REACHED Created 6 years, 1 month 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: Source/wtf/PageAllocator.cpp
diff --git a/Source/wtf/PageAllocator.cpp b/Source/wtf/PageAllocator.cpp
index fda703aec591d619f15f31d7d7f3fb0740bac9a6..1c38ddfc77201c57dd9864adef9acced8991c249 100644
--- a/Source/wtf/PageAllocator.cpp
+++ b/Source/wtf/PageAllocator.cpp
@@ -69,8 +69,15 @@ static bool shouldUseAddressHint()
// is running under WOW64, then it has at least 3 GB available (and likely
// 4 GB depending upon the OS version), and we want use the additional
// randomness.
- // TODO(tsepez): presently disabled due to IsWow64Process() compatibility.
- return true;
+ static BOOL bIsWow64 = -1;
+ if (bIsWow64 == -1) {
+ BOOL result = IsWow64Process(GetCurrentProcess(), &bIsWow64);
+ if (!result) {
+ ASSERT_NOT_REACHED();
+ bIsWow64 = 0;
+ }
+ }
+ return !!bIsWow64;
#else // CPU(32BIT)
return true;
#endif // CPU(32BIT)
« 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