platform_system_core/lmkd
Daniel Colascione 4dd5d00ecc Pin lmkd for real
We pin lmkd in memory so that we don't take page faults (and thus
requisition memory) while we're in the process of responding to a
low-memory condition. mlockall(2) is the right primitive for this
pinning. Previously, we used the MCL_FUTURE flag to mlockall: used
this way, mlockall doesn't actually pin all pages in memory, since
MCL_FUTURE affects only the default flags for future mappings and
doesn't affect mapping already in existence at the time of the
mlockall call --- like the lmkd executable itself.

This patch adds the MCL_CURRENT flag, which also pins all pages
already mapped.

Test: code inspection
Change-Id: I4563959367a2f0a9cadc3ea41731b7f311326685
2018-01-03 12:32:14 -08:00
..
Android.bp lmkd: Android.mk -> Android.bp 2017-04-28 15:20:18 -07:00
lmkd.c Pin lmkd for real 2018-01-03 12:32:14 -08:00
lmkd.rc
OWNERS Add lmkd/OWNERS. 2017-12-08 16:12:58 -08:00