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

Unified Diff: content/browser/zygote_host/zygote_host_impl_linux.cc

Issue 49843002: cros: Remove unused low memory margin code from sandbox and zygote (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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/zygote_host/zygote_host_impl_linux.h ('k') | content/public/browser/zygote_host_linux.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/zygote_host/zygote_host_impl_linux.cc
diff --git a/content/browser/zygote_host/zygote_host_impl_linux.cc b/content/browser/zygote_host/zygote_host_impl_linux.cc
index fea43b50b1719d13e4c2523a2f6537d388d16fda..044dedc9efa578aaf4a8249f0d914b99c5085bda 100644
--- a/content/browser/zygote_host/zygote_host_impl_linux.cc
+++ b/content/browser/zygote_host/zygote_host_impl_linux.cc
@@ -407,41 +407,6 @@ void ZygoteHostImpl::AdjustRendererOOMScore(base::ProcessHandle pid,
}
#endif
-void ZygoteHostImpl::AdjustLowMemoryMargin(int64 margin_mb) {
-#if defined(OS_CHROMEOS)
- // You can't change the low memory margin unless you're root. Because of this,
- // we can't set the low memory margin from the browser process.
- // So, we use the SUID binary to change it for us.
- if (using_suid_sandbox_) {
-#if defined(USE_TCMALLOC)
- // If heap profiling is running, these processes are not exiting, at least
- // on ChromeOS. The easiest thing to do is not launch them when profiling.
- // TODO(stevenjb): Investigate further and fix.
- if (IsHeapProfilerRunning())
- return;
-#endif
- std::vector<std::string> adj_low_mem_commandline;
- adj_low_mem_commandline.push_back(sandbox_binary_);
- adj_low_mem_commandline.push_back(sandbox::kAdjustLowMemMarginSwitch);
- adj_low_mem_commandline.push_back(base::Int64ToString(margin_mb));
-
- base::ProcessHandle sandbox_helper_process;
- if (base::LaunchProcess(adj_low_mem_commandline, base::LaunchOptions(),
- &sandbox_helper_process)) {
- base::EnsureProcessGetsReaped(sandbox_helper_process);
- } else {
- LOG(ERROR) << "Unable to run suid sandbox to set low memory margin.";
- }
- }
- // Don't adjust memory margin if we're not running with the sandbox: this
- // isn't very common, and not doing it has little impact.
-#else
- // Low memory notification is currently only implemented on ChromeOS.
- NOTREACHED() << "AdjustLowMemoryMargin not implemented";
-#endif // defined(OS_CHROMEOS)
-}
-
-
void ZygoteHostImpl::EnsureProcessTerminated(pid_t process) {
DCHECK(init_);
Pickle pickle;
« no previous file with comments | « content/browser/zygote_host/zygote_host_impl_linux.h ('k') | content/public/browser/zygote_host_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698