mirror of
https://github.com/ncruces/go-sqlite3.git
synced 2026-01-12 05:59:14 +00:00
17 lines
331 B
Go
17 lines
331 B
Go
//go:build (amd64 || arm64) && !(sqlite3_noshm || sqlite3_nosys)
|
|
|
|
package util
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/tetratelabs/wazero/experimental"
|
|
)
|
|
|
|
type mmapState struct{}
|
|
|
|
func withAllocator(ctx context.Context) context.Context {
|
|
return experimental.WithMemoryAllocator(ctx,
|
|
experimental.MemoryAllocatorFunc(newAllocator))
|
|
}
|