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

Unified Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 2619203006: Adjust memory sizes of persistent histogram allocations. (Closed)
Patch Set: Created 3 years, 11 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/browser/browser_child_process_host_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_process_host_impl.cc
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 43b5cf5cc0500c4870d8d85e3beee7fe67f9d1dc..001d6d32eda46eb56685ee7ec2466093d591e436 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -2597,7 +2597,10 @@ void RenderProcessHostImpl::CreateSharedRendererHistogramAllocator() {
// method will get called a second time meaning that a metrics-allocator
// already exists. Don't recreate it.
if (!metrics_allocator_) {
- // TODO(bcwhite): Update this with the correct memory size.
+ // Create persistent/shared memory and allow histograms to be stored in
+ // it. Memory that is not actualy used won't be physically mapped by the
+ // system. RendererMetrics usage, as reported in UMA, peaked around 0.7MiB
+ // as of 2016-12-20.
std::unique_ptr<base::SharedMemory> shm(new base::SharedMemory());
if (!shm->CreateAndMapAnonymous(2 << 20)) // 2 MiB
return;
« no previous file with comments | « content/browser/browser_child_process_host_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698