Loading media/libmedia/MediaUtils.cpp +9 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ #include "MediaUtils.h" extern "C" size_t __cfi_shadow_size(); extern "C" void __scudo_set_rss_limit(size_t, int) __attribute__((weak)); namespace android { Loading Loading @@ -65,6 +66,14 @@ void limitProcessMemory( maxMem = propVal; } // If 64-bit Scudo is in use, enforce the hard RSS limit (in MB). if (maxMem != SIZE_MAX && sizeof(void *) == 8 && &__scudo_set_rss_limit != 0) { __scudo_set_rss_limit(maxMem >> 20, 1); ALOGV("Scudo hard RSS limit set to %zu MB", maxMem >> 20); return; } // Increase by the size of the CFI shadow mapping. Most of the shadow is not // backed with physical pages, and it is possible for the result to be // higher than total physical memory. This is fine for RLIMIT_AS. Loading Loading
media/libmedia/MediaUtils.cpp +9 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ #include "MediaUtils.h" extern "C" size_t __cfi_shadow_size(); extern "C" void __scudo_set_rss_limit(size_t, int) __attribute__((weak)); namespace android { Loading Loading @@ -65,6 +66,14 @@ void limitProcessMemory( maxMem = propVal; } // If 64-bit Scudo is in use, enforce the hard RSS limit (in MB). if (maxMem != SIZE_MAX && sizeof(void *) == 8 && &__scudo_set_rss_limit != 0) { __scudo_set_rss_limit(maxMem >> 20, 1); ALOGV("Scudo hard RSS limit set to %zu MB", maxMem >> 20); return; } // Increase by the size of the CFI shadow mapping. Most of the shadow is not // backed with physical pages, and it is possible for the result to be // higher than total physical memory. This is fine for RLIMIT_AS. Loading