Example #1
0
func Lockall(flags LockallFlag) error {
	return syscall.Mlockall(int(flags))
}
Example #2
0
func lockMemory() error {
	// Mlockall prevents all current and future pages from being swapped out.
	return syscall.Mlockall(syscall.MCL_CURRENT | syscall.MCL_FUTURE)
}
Example #3
0
func lockMemory() {
	syscall.Mlockall(MCL_CURRENT | MCL_FUTURE)
}