Merge "Fix implicit conversion."
diff --git a/src/profiling/memory/wire_protocol.cc b/src/profiling/memory/wire_protocol.cc
index 6209fc8..6d561c3 100644
--- a/src/profiling/memory/wire_protocol.cc
+++ b/src/profiling/memory/wire_protocol.cc
@@ -87,7 +87,7 @@
       errno = EAGAIN;
       return false;
     }
-    buf = shmem->BeginWrite(lock, total_size);
+    buf = shmem->BeginWrite(lock, static_cast<size_t>(total_size));
   }
   if (!buf) {
     PERFETTO_DLOG("Buffer overflow.");