Function realtime_tools::lock_memory()
Defined in File realtime_helpers.hpp
Function Documentation
-
std::pair<bool, std::string> realtime_tools::lock_memory()
Locks the memory pages of the calling thread to prevent page faults. By calling this method, the programs locks all pages mapped into the address space of the calling process and future mappings. This means that the kernel will not swap out the pages to disk i.e., the pages are guaranteed to stay in RAM until later unlocked - which is important for realtime applications.
- Parameters:
message – [out] a message describing the result of the operation
- Returns:
a pair of a boolean indicating whether the operation succeeded or not and a message describing the result of the operation