summaryrefslogtreecommitdiffstats
path: root/libs/binder
diff options
context:
space:
mode:
authorRebecca Schultz Zavin <rebecca@android.com>2009-10-30 18:39:55 -0700
committerRebecca Schultz Zavin <rebecca@android.com>2009-11-12 16:31:12 -0800
commitc0c1092183ceb38dd4d70d2732dd3a743fefd567 (patch)
tree103ea3734dae9b26cbfd872cb65cdabf833e8dc0 /libs/binder
parentad55651fe7a0525bbf38efe47000a56685b6e81a (diff)
downloadframeworks_native-c0c1092183ceb38dd4d70d2732dd3a743fefd567.zip
frameworks_native-c0c1092183ceb38dd4d70d2732dd3a743fefd567.tar.gz
frameworks_native-c0c1092183ceb38dd4d70d2732dd3a743fefd567.tar.bz2
Modify the binder to request 1M - 2 pages instead of 1M. The backing store
in the kernel requires a guard page, so 1M allocations fragment memory very badly. Subtracting a couple of pages so that they fit in a power of two allows the kernel to make more efficient use of its virtual address space. Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Diffstat (limited to 'libs/binder')
-rw-r--r--libs/binder/ProcessState.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/binder/ProcessState.cpp b/libs/binder/ProcessState.cpp
index d7daf73..2d4e10d 100644
--- a/libs/binder/ProcessState.cpp
+++ b/libs/binder/ProcessState.cpp
@@ -41,7 +41,7 @@
#include <sys/mman.h>
#include <sys/stat.h>
-#define BINDER_VM_SIZE (1*1024*1024)
+#define BINDER_VM_SIZE ((1*1024*1024) - (4096 *2))
static bool gSingleProcess = false;