diff options
| author | 2017-03-03 09:41:14 +0800 | |
|---|---|---|
| committer | 2017-03-07 06:33:44 +0000 | |
| commit | 6ac7fb5aca33fca100bdba279847561b32c3f9ac (patch) | |
| tree | 283753fa717053655699537c2db4a4a72da74eb0 /libs/binder/ProcessState.cpp | |
| parent | 074c1cd1572275be5765f0530963e6930d785aaf (diff) | |
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 <opensource.ganesh@gmail.com>
Diffstat (limited to 'libs/binder/ProcessState.cpp')
| -rw-r--r-- | libs/binder/ProcessState.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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 <sys/stat.h> #include <sys/types.h> -#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 // ------------------------------------------------------------------------- |