This blog serves as a dumping ground for my own interests. On it you will find anything which I want to keep track of; links, articles, tips and tricks. Mostly it focuses on C++, Javascript and HTML, linux and performance.
Tuesday, 22 November 2011
Page faults
Major page faults: swapped out pages having to be swapped back in from disk
Minor page faults: marking a required page in memory as being in memory
mlockall results in all pages mapped by a process to remain resident in memory
#include <sys/mman.h>
int mlockall(int flags);
int munlockall(void);
flags:
MCL_CURRENT: Lock all of the pages currently mapped into the address space of the process.
MCL_FUTURE: Lock all of the pages that become mapped into the address space of the process in the future, when those mappings are established.
prefaulting in the stack will prevent minor page faults.
push and then pop a large block of data onto the stack at the start of a thread
Labels:
c++,
cpp,
linux,
programming
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment