diff options
author | Jessica Wagantall <jwagantall@cyngn.com> | 2016-07-07 12:07:33 -0700 |
---|---|---|
committer | Jessica Wagantall <jwagantall@cyngn.com> | 2016-07-07 14:15:22 -0700 |
commit | 1e7c9d2c408b17fa14f897cfe8d1ae06fe944637 (patch) | |
tree | 2e132ad77cb30013947b94eeb8d4835bbd01f664 /media/mediaserver | |
parent | fbef511c958b5f1b3e015d032dcac4ed7cc84876 (diff) | |
parent | d112f7d0c1dbaf0368365885becb11ca8d3f13a4 (diff) | |
download | frameworks_av-1e7c9d2c408b17fa14f897cfe8d1ae06fe944637.zip frameworks_av-1e7c9d2c408b17fa14f897cfe8d1ae06fe944637.tar.gz frameworks_av-1e7c9d2c408b17fa14f897cfe8d1ae06fe944637.tar.bz2 |
Merge remote-tracking branch 'remotes/android-6.0.1_r52' into HEAD
Ticket: CYNGNOS-3020
Change-Id: I7e8d69c5f7041b66893ea643c4bc19c3b7bcdda5
Diffstat (limited to 'media/mediaserver')
-rw-r--r-- | media/mediaserver/Android.mk | 1 | ||||
-rw-r--r-- | media/mediaserver/main_mediaserver.cpp | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/media/mediaserver/Android.mk b/media/mediaserver/Android.mk index 33766b5..ac25582 100644 --- a/media/mediaserver/Android.mk +++ b/media/mediaserver/Android.mk @@ -37,6 +37,7 @@ LOCAL_STATIC_LIBRARIES := \ LOCAL_C_INCLUDES := \ frameworks/av/media/libmediaplayerservice \ + frameworks/av/media/libmedia \ frameworks/av/services/medialog \ frameworks/av/services/audioflinger \ frameworks/av/services/audiopolicy \ diff --git a/media/mediaserver/main_mediaserver.cpp b/media/mediaserver/main_mediaserver.cpp index c16e646..f785c0d 100644 --- a/media/mediaserver/main_mediaserver.cpp +++ b/media/mediaserver/main_mediaserver.cpp @@ -36,6 +36,7 @@ #include "MediaPlayerService.h" #include "ResourceManagerService.h" #include "service/AudioPolicyService.h" +#include "MediaUtils.h" #include "SoundTriggerHwService.h" #include "RadioService.h" @@ -47,6 +48,11 @@ using namespace android; int main(int argc __unused, char** argv) { + limitProcessMemory( + "ro.media.maxmem", /* property that defines limit */ + SIZE_MAX, /* upper limit in bytes */ + 65 /* upper limit as percentage of physical RAM */); + signal(SIGPIPE, SIG_IGN); char value[PROPERTY_VALUE_MAX]; bool doLog = (property_get("ro.test_harness", value, "0") > 0) && (atoi(value) == 1); |