[gobolinux-users] Prevent a process from paging out
Carlo Calica
carlo at calica.com
Fri Sep 8 23:47:06 UTC 2006
man 2 mlock
It'll require patching the source. A quick ugly hack would be:
add "#include <sys/mman.h>" with other headers
add "mlockall(MCL_FUTURE)" towards the beginning of main()
Good luck. If you have problems check the return code, also see the
section on Limits and permissions in the manpage.
On 9/8/06, Dan <theyranos at gmail.com> wrote:
> I use evrouter (http://www.bedroomlan.org/~alexios/
> coding_evrouter.html) to make the extra buttons on my Logitech mouse
> do stuff. I've noticed recently that if I don't use it for a while,
> it can take as much as a minute for the button press to have any
> result, whereas if evrouter has done something recently, the response
> is instantaneous.
>
> The only guess I have as to why this is happening is the swap file.
> My hard drives are painfully slow, so paging in evrouter could
> definitely explain the delay. Does anyone know a way (other than
> buying more RAM) to prevent the machine from using the swap file for
> a specific process?
>
> Thanks
> Dan
> _______________________________________________
> gobolinux-users mailing list
> gobolinux-users at lists.gobolinux.org
> http://lists.gobolinux.org/mailman/listinfo/gobolinux-users
>
--
Carlo J. Calica
More information about the gobolinux-users
mailing list