This source file includes following definitions.
- VerifyUserPointerForSize
#include "mojo/system/memory.h"
#include <limits>
#include "base/logging.h"
namespace mojo {
namespace system {
template <size_t size>
bool VerifyUserPointerForSize(const void* pointer, size_t count) {
if (count > std::numeric_limits<size_t>::max() / size)
return false;
return count == 0 || !!pointer;
}
template MOJO_SYSTEM_IMPL_EXPORT bool VerifyUserPointerForSize<1>(
const void*, size_t);
template MOJO_SYSTEM_IMPL_EXPORT bool VerifyUserPointerForSize<4>(
const void*, size_t);
template MOJO_SYSTEM_IMPL_EXPORT bool VerifyUserPointerForSize<8>(
const void*, size_t);
}
}