// +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)
}

// +build linux

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)
}

Switch Linux over to using the `x/sys/unix` package
Switch Linux over to using the `x/sys/unix` package

Same syscall interface, but the `x/sys/unix` package is not frozen.  No functional change from this commit.
