From 0430dd38642dd28e18567a0d683b6e3f7688c1df Mon Sep 17 00:00:00 2001 From: Ruthwar Ambeer Date: Thu, 19 Jul 2018 15:53:23 +0530 Subject: [PATCH] msm8226-common: libril: FR51015: Tuning of Binder buffer for rild. Tuned the Binder buffer to 500KB as it is not going to use the default allocated 1MB which saves RAM for 32 bit processors. Change-Id: Ifea2720f8e853643a37912c3459e923168677b1e CRs-Fixed: 2283052 [haggertk: This is just the libril side up the upstream change] --- ril/libril/ril.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ril/libril/ril.cpp b/ril/libril/ril.cpp index 2b36513..c8dab21 100644 --- a/ril/libril/ril.cpp +++ b/ril/libril/ril.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -56,6 +57,10 @@ RIL_onRequestComplete(RIL_Token t, RIL_Errno e, void *response, size_t responsel extern "C" void RIL_onRequestAck(RIL_Token t); + +extern "C" void +initWithMmapSize(); + namespace android { #define PHONE_PROCESS "radio" @@ -85,6 +90,9 @@ namespace android { // request, response, and unsolicited msg print macro #define PRINTBUF_SIZE 8096 +// Set hwbinder buffer size to 512KB +#define HW_BINDER_MMAP_SIZE 524288 + enum WakeType {DONT_WAKE, WAKE_PARTIAL}; typedef struct { @@ -1244,4 +1252,9 @@ rilSocketIdToString(RIL_SOCKET_ID socket_id) } } +extern "C" void +initWithMmapSize() { + android::hardware::ProcessState::initWithMmapSize((size_t)(HW_BINDER_MMAP_SIZE)); +} + } /* namespace android */