From 1e664231d62ba3c70e5f0794b29b090005612493 Mon Sep 17 00:00:00 2001 From: Ashok Mutyala Date: Tue, 16 Jan 2024 21:20:56 +0530 Subject: [PATCH] dre: init: Mlock limited to 64 KB In Android 14 and higher, the platform reduces the maximum memory that can be locked using mlock() to 64 KB per process. In previous versions, the limit was 64 MB per process. The new restriction promotes better memory management across apps and the system. Test: CtsInitTestCases#MemLockLimit Signed-off-by: Ashok Mutyala Change-Id: I883bff0c1e4bd540a1fae9ab0ea35ebdf4da5255 --- init/init.qcom.rc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init/init.qcom.rc b/init/init.qcom.rc index e900560..fb8364b 100644 --- a/init/init.qcom.rc +++ b/init/init.qcom.rc @@ -82,8 +82,8 @@ on post-fs chmod 0755 /sys/kernel/debug/tracing on early-boot - # set RLIMIT_MEMLOCK to 64MB - setrlimit 8 67108864 67108864 + # set RLIMIT_MEMLOCK to 64KB + setrlimit 8 65536 65536 # Allow subsystem (modem etc) debugging write /sys/kernel/boot_adsp/boot 1 write /sys/kernel/boot_cdsp/boot 1