mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 19:47:54 +00:00
18 lines
314 B
Go
18 lines
314 B
Go
// +build solaris
|
|
|
|
package mlock
|
|
|
|
import (
|
|
"syscall"
|
|
"golang.org/x/sys/unix"
|
|
)
|
|
|
|
func init() {
|
|
supported = true
|
|
}
|
|
|
|
func lockMemory() error {
|
|
// Mlockall prevents all current and future pages from being swapped out.
|
|
return unix.Mlockall(syscall.MCL_CURRENT | syscall.MCL_FUTURE)
|
|
}
|