From 6ac7fb5aca33fca100bdba279847561b32c3f9ac Mon Sep 17 00:00:00 2001 From: Ganesh Mahendran Date: Fri, 3 Mar 2017 09:41:14 +0800 Subject: libbinder: use sysconf(_SC_PAGESIZE) to get pagesize pagesize is not always 4KB, use sysconf(_SC_PAGESIZE) to get real pagesize. Change-Id: Ib2c82c3a842257601a5c304da3a1f0b07c6ab8c0 Signed-off-by: Ganesh Mahendran --- 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 d42bb82415..5b705013c5 100644 --- a/libs/binder/ProcessState.cpp +++ b/libs/binder/ProcessState.cpp @@ -40,7 +40,7 @@ #include #include -#define BINDER_VM_SIZE ((1*1024*1024) - (4096 *2)) +#define BINDER_VM_SIZE ((1 * 1024 * 1024) - sysconf(_SC_PAGE_SIZE) * 2) #define DEFAULT_MAX_BINDER_THREADS 15 // ------------------------------------------------------------------------- -- cgit v1.2.3-59-g8ed1b