summaryrefslogtreecommitdiffstats
path: root/cmds
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2012-04-19 17:31:53 -0700
committerMathias Agopian <mathias@google.com>2012-04-19 17:32:03 -0700
commit64a1e08b86d72cb375f9dfdf4eb6307f71817350 (patch)
treeed3cdc1483a0e66d139d29335be06cd8b3e828f0 /cmds
parent4a8111bc8c7e659164f75dcfe9efcd33582f3669 (diff)
downloadframeworks_native-64a1e08b86d72cb375f9dfdf4eb6307f71817350.zip
frameworks_native-64a1e08b86d72cb375f9dfdf4eb6307f71817350.tar.gz
frameworks_native-64a1e08b86d72cb375f9dfdf4eb6307f71817350.tar.bz2
SF doesn't need more than a few binder threads
Change-Id: Ic4659fb81f9990cc7caf84a496a8ae659a1d16a9
Diffstat (limited to 'cmds')
-rw-r--r--cmds/surfaceflinger/main_surfaceflinger.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/cmds/surfaceflinger/main_surfaceflinger.cpp b/cmds/surfaceflinger/main_surfaceflinger.cpp
index 6dbcf5c..28e58e4 100644
--- a/cmds/surfaceflinger/main_surfaceflinger.cpp
+++ b/cmds/surfaceflinger/main_surfaceflinger.cpp
@@ -21,5 +21,8 @@ using namespace android;
int main(int argc, char** argv) {
SurfaceFlinger::publishAndJoinThreadPool(true);
+ // When SF is launched in its own process, limit the number of
+ // binder threads to 4.
+ ProcessState::self()->setThreadPoolMaxThreadCount(4);
return 0;
}