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