mirror of
				https://github.com/optim-enterprises-bv/vault.git
				synced 2025-11-04 04:28:08 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			15 lines
		
	
	
		
			255 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			255 B
		
	
	
	
		
			Go
		
	
	
	
	
	
// +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)
 | 
						|
}
 |