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 <quic_amutyala@quicinc.com>
Change-Id: I883bff0c1e4bd540a1fae9ab0ea35ebdf4da5255
This commit is contained in:
Ashok Mutyala 2024-01-16 21:20:56 +05:30 committed by Albert Tang
parent 4d4f07bd89
commit 2a9c6383cb

View file

@ -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