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

Unified Diff: content/common/gpu/gpu_memory_uma_stats.h

Issue 1684793003: Add comments for struct members that were changed from size_t to uin32_t or uint64_t for IPC safety. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 | « content/common/gpu/gpu_memory_manager.cc ('k') | content/public/common/gpu_memory_stats.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/gpu_memory_uma_stats.h
diff --git a/content/common/gpu/gpu_memory_uma_stats.h b/content/common/gpu/gpu_memory_uma_stats.h
index 16c8813544a99769924ffbaa398dda9f0179debc..779b57166df588d35950b7e38b77473a70c1dbe4 100644
--- a/content/common/gpu/gpu_memory_uma_stats.h
+++ b/content/common/gpu/gpu_memory_uma_stats.h
@@ -11,6 +11,8 @@ namespace content {
// Memory usage statistics send periodically to the browser process to report
// in UMA histograms if the GPU process crashes.
+// Note: we use uint64_t instead of size_t for byte count because this struct
+// is sent over IPC which could span 32 & 64 bit processes.
struct GPUMemoryUmaStats {
GPUMemoryUmaStats()
: bytes_allocated_current(0),
@@ -19,10 +21,10 @@ struct GPUMemoryUmaStats {
}
// The number of bytes currently allocated.
- uint32_t bytes_allocated_current;
+ uint64_t bytes_allocated_current;
// The maximum number of bytes ever allocated at once.
- uint32_t bytes_allocated_max;
+ uint64_t bytes_allocated_max;
// The number of context groups.
uint32_t context_group_count;
« no previous file with comments | « content/common/gpu/gpu_memory_manager.cc ('k') | content/public/common/gpu_memory_stats.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698