Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c0c10921 authored by Rebecca Schultz Zavin's avatar Rebecca Schultz Zavin
Browse files

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: default avatarRebecca Schultz Zavin <rebecca@android.com>
parent ad55651f
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -41,7 +41,7 @@
#include <sys/mman.h>
#include <sys/mman.h>
#include <sys/stat.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;
static bool gSingleProcess = false;