mirror of
https://github.com/hanzoai/wasm2go.git
synced 2026-10-30 15:06:48 +00:00
24 lines
648 B
Go
24 lines
648 B
Go
//go:build !unix
|
|
|
|
package goccy_asm
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
)
|
|
|
|
// Platforms without mmap (windows, js/wasm, ...) get the historical behaviour:
|
|
// every instance allocates and initializes its own linear memory. Correct, only
|
|
// larger — see sharedimage.go for what the sharing buys.
|
|
const mmapSupported = false
|
|
|
|
func mmapImage(f *os.File, ceiling int) ([]byte, error) {
|
|
return nil, fmt.Errorf("wasm2go: copy-on-write memory is not supported on this platform")
|
|
}
|
|
|
|
func unmapMemory(mem []byte) {}
|
|
|
|
func mmapShared(f *os.File, length int) ([]byte, error) {
|
|
return nil, fmt.Errorf("wasm2go: copy-on-write memory is not supported on this platform")
|
|
}
|