github.com/wasilibs/wazerox@v0.0.0-20240124024944-4923be63ab5f/internal/platform/mmap_unsupported.go (about)

     1  //go:build !(darwin || linux || freebsd || windows)
     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  func munmapCodeSegment(code []byte) error {
    13  	panic(errUnsupported)
    14  }
    15  
    16  func mmapCodeSegmentAMD64(size int) ([]byte, error) {
    17  	panic(errUnsupported)
    18  }
    19  
    20  func mmapCodeSegmentARM64(size int) ([]byte, error) {
    21  	panic(errUnsupported)
    22  }
    23  
    24  func mmapMemory(size int) ([]byte, error) {
    25  	panic(errUnsupported)
    26  }
    27  
    28  func MprotectRX(b []byte) (err error) {
    29  	panic(errUnsupported)
    30  }