Locking kdecore into memory
richmoore44 at gmail.com
Fri Jan 19 22:04:23 GMT 2007
On 1/19/07, Lubos Lunak <l.lunak at suse.cz> wrote:
> > IIRC mlock is only available as root so we can't do that.
> (Is it really simpler to send a mail that's wrong than just skimming over the
> manpage?) Having a small setuid helper just locking all libraries in memory
> wouldn't be a big deal. And in fact even non-root apps can do that, up to the
> set ulimit, but it's set to quite low value, at least here. It'd be nice if
> it was higher, important apps then could just do mlockall() and that'd be it,
> but I'm not quite sure people setting these limits would share our point of
> PS: I wonder, would this be Linux-only or does OOM suck also with other
And since I used to work on software that used to use this call a lot
I know the answer to that question eg. from the freebsd man page
'These calls are only available to the super-user.' or we could look
at solaris 'Because of the impact on system resources, the use
of mlock() and munlock() is restricted to the superuser.'
Looking at a linux man page and generalising is often a mistake. You
can also get bitten by the fact that if two processes lock a page, and
one unlocks it the page gets unlocked - there is no ref count.
More information about the kde-core-devel