-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Evgeni Golov wrote:
I'd like to write a small daemon in Python, which should never be swapped out (on Linux, this daemon will be Linux specific, so no need in a platform-independent solution).
In C I'd do: #include <sys/mman.h> mlockall(MCL_FUTURE); //do stuff here munlockall();
Is there anything similar in Python?
I would like things like this added to core python, but since you are restricting yourself to linux, you can use a (trivial) ctypes wrapper. - -- Jesus Cea Avion _/_/ _/_/_/ _/_/_/ jcea@jcea.es - http://www.jcea.es/ _/_/ _/_/ _/_/ _/_/ _/_/ jabber / xmpp:jcea@jabber.org _/_/ _/_/ _/_/_/_/_/ . _/_/ _/_/ _/_/ _/_/ _/_/ "Things are not so easy" _/_/ _/_/ _/_/ _/_/ _/_/ _/_/ "My name is Dump, Core Dump" _/_/_/ _/_/_/ _/_/ _/_/ "El amor es poner tu felicidad en la felicidad de otro" - Leibniz -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iQCVAwUBSYGjQZlgi5GaxT1NAQIUMAP/Tl7SWFgVkeeEdRHbkrtlOX4eERbfny7A xBkUVO72lPB1XnRxZT0+Vo2ggYh/6IHN6SQriEZZPe9Wwn3cZzirjjAqpdvb70TJ 1BezGtLKsoDp4cf6QqDwfITecMaGjfaNhKvvSvPFzaKlpbjsdQjyGCI0dOvxzY5J 6BUxE2yYJdc= =N0dO -----END PGP SIGNATURE-----