summaryrefslogtreecommitdiffstats
path: root/libril/ril.cpp
diff options
context:
space:
mode:
authorRuthwar Ambeer <rambeer@codeaurora.org>2018-07-19 15:53:23 +0530
committerRuthwar Ambeer <rambeer@codeaurora.org>2018-07-25 16:13:31 +0530
commitc9eed2722b97c4d4e8f8bfc2558d02b17fa5ef21 (patch)
tree2338fe1404d3578bd610ea99ee20987839f074da /libril/ril.cpp
parent113dbaa061b837ed4f743dffc1d60466a88acd85 (diff)
downloadandroid_hardware_ril-c9eed2722b97c4d4e8f8bfc2558d02b17fa5ef21.tar.gz
android_hardware_ril-c9eed2722b97c4d4e8f8bfc2558d02b17fa5ef21.tar.bz2
android_hardware_ril-c9eed2722b97c4d4e8f8bfc2558d02b17fa5ef21.zip
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
Diffstat (limited to 'libril/ril.cpp')
-rw-r--r--libril/ril.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/libril/ril.cpp b/libril/ril.cpp
index 514ac90..ceec055 100644
--- a/libril/ril.cpp
+++ b/libril/ril.cpp
@@ -22,6 +22,7 @@
#include <telephony/ril_cdma_sms.h>
#include <cutils/sockets.h>
#include <cutils/jstring.h>
+#include <hwbinder/ProcessState.h>
#include <telephony/record_stream.h>
#include <utils/Log.h>
#include <utils/SystemClock.h>
@@ -54,6 +55,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"
@@ -83,6 +88,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 {
@@ -1238,4 +1246,9 @@ rilSocketIdToString(RIL_SOCKET_ID socket_id)
}
}
+extern "C" void
+initWithMmapSize() {
+ android::hardware::ProcessState::initWithMmapSize((size_t)(HW_BINDER_MMAP_SIZE));
+}
+
} /* namespace android */