diff --git a/ril/libril/ril.cpp b/ril/libril/ril.cpp index 6556d0da..1bf3d6d1 100644 --- a/ril/libril/ril.cpp +++ b/ril/libril/ril.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -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 { @@ -1297,4 +1305,9 @@ rilSocketIdToString(RIL_SOCKET_ID socket_id) } } +extern "C" void +initWithMmapSize() { + android::hardware::ProcessState::initWithMmapSize((size_t)(HW_BINDER_MMAP_SIZE)); +} + } /* namespace android */ \ No newline at end of file