You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MCL_ONFAULT (since Linux 4.4)
Used together with MCL_CURRENT, MCL_FUTURE, or both. Mark all current (with MCL_CURRENT) or future (with MCL_FUTURE) mappings to lock pages when they are faulted in. When used with MCL_CURRENT, all present pages are locked, but mlockall() will not fault in non-present pages. When used with MCL_FUTURE, all future mappings will be marked to lock pages when they are faulted in, but they will not be populated by the lock when the mapping is created. MCL_ONFAULT must be used with either MCL_CURRENT or MCL_FUTURE or both.
Earlyoom will use 0.7 MiB RSS instead of 2.0 MiB if you use mlockall(MCL_CURRENT | MCL_FUTURE | MCL_ONFAULT).
if (mlockall(MCL_CURRENT | MCL_FUTURE | MCL_ONFAULT) != 0)
if (mlockall(MCL_CURRENT | MCL_FUTURE) != 0) // for old kernels
perror("Could not lock memory - continuing anyway");
The text was updated successfully, but these errors were encountered:
Earlyoom will use 0.7 MiB RSS instead of 2.0 MiB if you use mlockall(MCL_CURRENT | MCL_FUTURE | MCL_ONFAULT).
See also golang/go#28114
Status with MCL_ONFAULT
Code:
The text was updated successfully, but these errors were encountered: