I need to lock pages of my program in memory. Program run under Solaris 10 OS from unprivileged user. I've tried to use: mlock(), mlockall() and plock(), but always get the same result:
plock/mlock/mlockall: Not owner
But it works from root. So can I lock pages of my program in memory from unprivileged user, somehow?
Thanks!
I found decision and want to share it. May be it will be helpful for someone else. I modified privileges of user, under Solaris it can be done by next command:
usermod -K defaultpriv=basic,proc_lock_memory user
I think in Linux could be the same situation and it can be resolved using Linux capabilities.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With