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

Unified Diff: mojo/system/memory.h

Issue 103533008: Mojo: More data pipe implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: indentation Created 7 years 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 | « mojo/system/data_pipe_producer_dispatcher.cc ('k') | mojo/system/memory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/memory.h
diff --git a/mojo/system/memory.h b/mojo/system/memory.h
index 6483e0331af9a3431a3b78087bbc5a3fdba83109..9a25ef99045d58557f49f5a899e519eefd26cdb1 100644
--- a/mojo/system/memory.h
+++ b/mojo/system/memory.h
@@ -19,6 +19,12 @@ template <size_t size>
bool MOJO_SYSTEM_IMPL_EXPORT VerifyUserPointerForSize(const void* pointer,
size_t count);
+// A non-templatized version of the above, for when the element size isn't
+// fixed.
+bool MOJO_SYSTEM_IMPL_EXPORT VerifyUserPointerForSize(const void* pointer,
+ size_t size,
+ size_t count);
+
// Verify that |count * sizeof(T)| bytes can be read from the user |pointer|
// insofar as possible/necessary (note: this is done carefully since |count *
// sizeof(T)| may overflow a |size_t|. |count| may be zero. If |T| is |void|,
« no previous file with comments | « mojo/system/data_pipe_producer_dispatcher.cc ('k') | mojo/system/memory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698