From a0a40883d0f4bdc0694b236353ad66a4b4ca92fa Mon Sep 17 00:00:00 2001 From: Rebecca Schultz Zavin Date: Fri, 30 Oct 2009 18:39:55 -0700 Subject: 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 --- libs/binder/ProcessState.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs/binder/ProcessState.cpp') 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 #include -#define BINDER_VM_SIZE (1*1024*1024) +#define BINDER_VM_SIZE ((1*1024*1024) - (4096 *2)) static bool gSingleProcess = false; -- cgit v1.2.3-59-g8ed1b