Disabling Linux memory overcommit inside an application

1.7k Views Asked by At

You can adjust the memory overcommit policy system-wide via sysctl calls, but is it possible to adjust this policy on a per-process basis from within the process itself?

I want to make one particular real-time process never use overcommit, though the rest of the system can overcommit.

1

There are 1 best solutions below

1
janneb On BEST ANSWER

No, it's not possible.

Somewhat related, for a real-time process, you probably want to use the mlock or mlockall functions to pin your address space to RAM.