8c9dadf82b
NetBSD doesn't have the right symbols defined in Go for mlockall support. The OS supports it just fine, but the definitions aren't present in Go. If someone wanted to they could add support XOR the values from `sys/mman.h` for `MCL_CURRENT | MCL_FUTURE` which is almost certainly `0x01 | 0x02` but we're not going to do that in code due to the maintenance of a one-off just for NetBSD. PR's welcome.
14 lines
264 B
Go
14 lines
264 B
Go
// +build android nacl netbsd plan9 windows
|
|
|
|
package mlock
|
|
|
|
func init() {
|
|
supported = false
|
|
}
|
|
|
|
func lockMemory() error {
|
|
// XXX: No good way to do this on Windows. There is the VirtualLock
|
|
// method, but it requires a specific address and offset.
|
|
return nil
|
|
}
|