samsung: libril: 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
diff --git a/ril/libril/ril.cpp b/ril/libril/ril.cpp
index 6556d0d..1bf3d6d 100644
--- a/ril/libril/ril.cpp
+++ b/ril/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 @@
extern "C" void
RIL_onRequestAck(RIL_Token t);
+
+extern "C" void
+initWithMmapSize();
+
namespace android {
#define PHONE_PROCESS "radio"
@@ -83,6 +88,9 @@
// 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 {
@@ -1297,4 +1305,9 @@
}
}
+extern "C" void
+initWithMmapSize() {
+ android::hardware::ProcessState::initWithMmapSize((size_t)(HW_BINDER_MMAP_SIZE));
+}
+
} /* namespace android */
\ No newline at end of file