I did a quick test with your app and another that just does a bunch
of malloc’s and it does not look like the munlockall() will persist
across an exec. Posix says memory locks should not persist across
an exec, so the same should be true of unlocks I believe.
Superuser <email@example.com> wrote:
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
As am experiment I wrote the following:
so I can try - swap prog args
that assumes that munlockall() persists across an exec()
beside watching the output of swapctl, is there any other way
I can verify that a program’s pages are unlocked ???
Previously, > firstname.lastname@example.org > wrote in qdn.public.qnxrtp.os:
Michael Tasche <> email@example.com> > wrote:
firstname.lastname@example.org > wrote:
Swapping by default is disabled for all app. You have to take
special steps to enable it.
Which are the steps?
I had not found something in the docs.
You have to unlock you memory with a call to munlockall(). This
will enable swapping for you, but I don’t think this is really
recommented yet, as the swapping is still fairly new and only
guaranteed to work with gcc and friends.