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

Unified Diff: base/shared_memory.h

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 | « no previous file | base/shared_memory_nacl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/shared_memory.h
diff --git a/base/shared_memory.h b/base/shared_memory.h
index e1c083377bb56f55d9cc6726d3148ba57b67afea..1f8237eb3001c6399e9cfe6faf0f8e9548986b3a 100644
--- a/base/shared_memory.h
+++ b/base/shared_memory.h
@@ -142,8 +142,10 @@ class BASE_EXPORT SharedMemory {
// Maps the shared memory into the caller's address space.
// Returns true on success, false otherwise. The memory address
- // is accessed via the memory() accessor.
+ // is accessed via the memory() accessor. The mapped address is guaranteed to
+ // have an alignment of at least MAP_MINIMUM_ALIGNMENT.
bool Map(uint32 bytes);
+ enum { MAP_MINIMUM_ALIGNMENT = 32 };
// Unmaps the shared memory from the caller's address space.
// Returns true if successful; returns false on error or if the
« no previous file with comments | « no previous file | base/shared_memory_nacl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698