opnsense-ports/security/vault/files/patch-helper_mlock_mlock__linux.go
Franco Fichtner 288580cbcc */*: sync with upstream
Taken from: FreeBSD
2016-05-21 07:56:30 +02:00

17 lines
379 B
Go

--- helper/mlock/mlock_linux.go.orig 2016-03-16 19:48:36 UTC
+++ helper/mlock/mlock_linux.go
@@ -1,14 +0,0 @@
-// +build linux
-
-package mlock
-
-import "syscall"
-
-func init() {
- supported = true
-}
-
-func lockMemory() error {
- // Mlockall prevents all current and future pages from being swapped out.
- return syscall.Mlockall(syscall.MCL_CURRENT | syscall.MCL_FUTURE)
-}