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|, |