Function realtime_tools::lock_memory(std::string&)

Function Documentation

bool realtime_tools::lock_memory(std::string &message)

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:

true if memory locking succeeded, false otherwise.