github.com/tetratelabs/wazero@v1.7.3-0.20240513003603-48f702e154b5/internal/platform/mremap_other.go (about) 1 //go:build !(darwin || linux || freebsd) || tinygo 2 3 package platform 4 5 func remapCodeSegmentAMD64(code []byte, size int) ([]byte, error) { 6 b, err := mmapCodeSegmentAMD64(size) 7 if err != nil { 8 return nil, err 9 } 10 copy(b, code) 11 mustMunmapCodeSegment(code) 12 return b, nil 13 } 14 15 func remapCodeSegmentARM64(code []byte, size int) ([]byte, error) { 16 b, err := mmapCodeSegmentARM64(size) 17 if err != nil { 18 return nil, err 19 } 20 copy(b, code) 21 mustMunmapCodeSegment(code) 22 return b, nil 23 }