Chromium Code Reviews| 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 |