github.com/tetratelabs/wazero@v1.7.3-0.20240513003603-48f702e154b5/internal/platform/mmap_unsupported.go (about) 1 //go:build !(darwin || linux || freebsd || windows) || tinygo 2 3 package platform 4 5 import ( 6 "fmt" 7 "runtime" 8 ) 9 10 var errUnsupported = fmt.Errorf("mmap unsupported on GOOS=%s. Use interpreter instead.", runtime.GOOS) 11 12 const MmapSupported = false 13 14 func munmapCodeSegment(code []byte) error { 15 panic(errUnsupported) 16 } 17 18 func mmapCodeSegmentAMD64(size int) ([]byte, error) { 19 panic(errUnsupported) 20 } 21 22 func mmapCodeSegmentARM64(size int) ([]byte, error) { 23 panic(errUnsupported) 24 } 25 26 func MprotectRX(b []byte) (err error) { 27 panic(errUnsupported) 28 }