summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Android (Google) Code Review <android-gerrit@google.com> 2009-11-12 21:29:13 -0800
committer Android (Google) Code Review <android-gerrit@google.com> 2009-11-12 21:29:13 -0800
commit5f8f1487be78064e8d653dd2d105d8dd444d6a35 (patch)
tree7387c11d6ad7a3457582bd184e7b38d6143b83fa
parent11fea858b2f2d3f9c40a4da848d7bcee47edde04 (diff)
parenta0a40883d0f4bdc0694b236353ad66a4b4ca92fa (diff)
Merge change Ia0a40883 into eclair
* changes: 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.
-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 d7daf734279e..2d4e10ddde53 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;