For an dedicated test I have to disable "demand paging" for exactly one of my userspace programs
http://en.wikipedia.org/wiki/Demand_paging
Any idea how I could do this ? (embedded linux appliance; 2.6 kernel)
For an dedicated test I have to disable "demand paging" for exactly one of my userspace programs
http://en.wikipedia.org/wiki/Demand_paging
Any idea how I could do this ? (embedded linux appliance; 2.6 kernel)
If you have the ability to modify the application, you could use the mlock()
/ mlockall()
system calls to ensure that your memory doesn't get paged out:
#include <sys/mman.h>
mlockall(MCL_FUTURE);
This will prevent all memory currently allocated, and any future memory that is allocated to this process from being swapped out. You can use the mlock()
system call to get finer control over which parts of memory are locked.