示例#1
0
func Lockall(flags LockallFlag) error {
	return syscall.Mlockall(int(flags))
}
示例#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)
}
示例#3
0
func lockMemory() {
	syscall.Mlockall(MCL_CURRENT | MCL_FUTURE)
}