PPysolate SpineREAD THE CODE · UNDERSTAND THE SYSTEM
课程与章节
源码索引 / CURRENT IMPLEMENTATION

cow.go

22 行 · 点击行号可定位;函数链接随声明位置更新,不手填行号。

package spine

import (
	"github.com/tetratelabs/wazero/api"
	"github.com/tetratelabs/wazero/experimental"
)

// cowRuntime owns the immutable image; each instance owns its mapping.
// Implementations are intentionally Linux-specific; other platforms return an
// unsupported-constructor error rather than silently falling back to copying.
type cowMemory interface {
	experimental.MemoryAllocator
	experimental.LinearMemory
}

type cowRuntime interface {
	allocator(api.MemoryDefinition) (cowMemory, error)
	capture(api.Memory) error
	attach(api.Memory) error
	ready() bool
	close() error
}