Loading services/mediaextractor/main_extractorservice.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,9 @@ ** limitations under the License. */ //#define LOG_NDEBUG 0 #define LOG_TAG "main_extractorservice" #include <fcntl.h> #include <sys/prctl.h> #include <sys/wait.h> Loading @@ -26,6 +29,7 @@ #include <android-base/logging.h> #include <android-base/properties.h> #include <utils/Log.h> #include <utils/misc.h> // from LOCAL_C_INCLUDES Loading @@ -41,10 +45,16 @@ static const char kVendorSeccompPolicyPath[] = int main(int argc __unused, char** argv) { #if __has_feature(hwaddress_sanitizer) ALOGI("disable media.extractor memory limits (hwasan enabled)"); #else ALOGI("enable media.extractor memory limits"); limitProcessMemory( "ro.media.maxmem", /* property that defines limit */ SIZE_MAX, /* upper limit in bytes */ 20 /* upper limit as percentage of physical RAM */); #endif signal(SIGPIPE, SIG_IGN); Loading Loading
services/mediaextractor/main_extractorservice.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,9 @@ ** limitations under the License. */ //#define LOG_NDEBUG 0 #define LOG_TAG "main_extractorservice" #include <fcntl.h> #include <sys/prctl.h> #include <sys/wait.h> Loading @@ -26,6 +29,7 @@ #include <android-base/logging.h> #include <android-base/properties.h> #include <utils/Log.h> #include <utils/misc.h> // from LOCAL_C_INCLUDES Loading @@ -41,10 +45,16 @@ static const char kVendorSeccompPolicyPath[] = int main(int argc __unused, char** argv) { #if __has_feature(hwaddress_sanitizer) ALOGI("disable media.extractor memory limits (hwasan enabled)"); #else ALOGI("enable media.extractor memory limits"); limitProcessMemory( "ro.media.maxmem", /* property that defines limit */ SIZE_MAX, /* upper limit in bytes */ 20 /* upper limit as percentage of physical RAM */); #endif signal(SIGPIPE, SIG_IGN); Loading