open-vault/sdk/helper/mlock/mlock.go
2019-04-12 17:54:35 -04:00

16 lines
362 B
Go

package mlock
// This should be set by the OS-specific packages to tell whether LockMemory
// is supported or not.
var supported bool
// Supported returns true if LockMemory is functional on this system.
func Supported() bool {
return supported
}
// LockMemory prevents any memory from being swapped to disk.
func LockMemory() error {
return lockMemory()
}