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

Unified Diff: base/shared_memory_win.cc

Issue 10827400: Advertise a minimum alignment for SharedMemory::Map(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename enum. Created 8 years, 4 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 | « base/shared_memory_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/shared_memory_win.cc
diff --git a/base/shared_memory_win.cc b/base/shared_memory_win.cc
index 042eb8bdac065c5b1d1911faeee66c5a1e2f1569..a4f86cbc15de70e51389caa21ad0458f9cff9b7e 100644
--- a/base/shared_memory_win.cc
+++ b/base/shared_memory_win.cc
@@ -136,6 +136,8 @@ bool SharedMemory::Map(uint32 bytes) {
memory_ = MapViewOfFile(mapped_file_,
read_only_ ? FILE_MAP_READ : FILE_MAP_ALL_ACCESS, 0, 0, bytes);
if (memory_ != NULL) {
+ DCHECK_EQ(0U, reinterpret_cast<uintptr_t>(memory_) &
+ (SharedMemory::MAP_MINIMUM_ALIGNMENT - 1));
return true;
}
return false;
« no previous file with comments | « base/shared_memory_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698