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

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

Issue 356453003: Don't share renderers between unrelated tabs on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Grace's and John's comments. Created 6 years, 5 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
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 c629485f9059f0cd40fdcc431afc5543dfdf0eae..4d5dba7d9bf77aa572abd68deeb49e78b47dd6b2 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -394,15 +394,22 @@ size_t RenderProcessHost::GetMaxRendererProcessCount() {
if (g_max_renderer_count_override)
return g_max_renderer_count_override;
- // Defines the maximum number of renderer processes according to the
- // amount of installed memory as reported by the OS. The calculation
- // assumes that you want the renderers to use half of the installed
- // RAM and assuming that each WebContents uses ~40MB.
- // If you modify this assumption, you need to adjust the
- // ThirtyFourTabs test to match the expected number of processes.
+ // On Android we don't maintain a limit of renderer process hosts - we are
jam 2014/07/16 20:22:07 nit: put the comment inside the ifdef to make it c
ppi 2014/07/17 10:14:45 Done.
+ // happy with keeping a lot of these, as long as the number of live renderer
+ // processes remains reasonable, and on Android the OS takes care of that.
+#if defined(OS_ANDROID)
+ return std::numeric_limits<size_t>::max();
+#endif
+
+ // On other platforms, we calculate the maximum number of renderer process
+ // hosts according to the amount of installed memory as reported by the OS.
+ // The calculation assumes that you want the renderers to use half of the
+ // installed RAM and assuming that each WebContents uses ~40MB. If you modify
+ // this assumption, you need to adjust the ThirtyFourTabs test to match the
+ // expected number of processes.
//
- // With the given amounts of installed memory below on a 32-bit CPU,
- // the maximum renderer count will roughly be as follows:
+ // With the given amounts of installed memory below on a 32-bit CPU, the
+ // maximum renderer count will roughly be as follows:
//
// 128 MB -> 3
// 512 MB -> 6
« no previous file with comments | « content/browser/android/content_startup_flags.cc ('k') | content/browser/renderer_host/render_process_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698