Lines Matching refs:maxMem
36 size_t maxMem = SIZE_MAX; in limitProcessMemory() local
40 maxMem = size_t(numPages) * size_t(pageSize); in limitProcessMemory()
42 ALOGV("physMem: %zu", maxMem); in limitProcessMemory()
47 maxMem = maxMem / 100 * percentageOfTotalMem; in limitProcessMemory()
48 if (numberOfBytes < maxMem) { in limitProcessMemory()
49 maxMem = numberOfBytes; in limitProcessMemory()
51 ALOGV("requested limit: %zu", maxMem); in limitProcessMemory()
56 int64_t propVal = property_get_int64(property, maxMem); in limitProcessMemory()
58 maxMem = propVal; in limitProcessMemory()
62 if (maxMem != SIZE_MAX && &__scudo_set_rss_limit != 0) { in limitProcessMemory()
63 __scudo_set_rss_limit(maxMem >> 20, 1); in limitProcessMemory()
64 ALOGV("Scudo hard RSS limit set to %zu MB", maxMem >> 20); in limitProcessMemory()
68 if (!android_mallopt(M_SET_ALLOCATION_LIMIT_BYTES, &maxMem, in limitProcessMemory()
69 sizeof(maxMem))) { in limitProcessMemory()