blob: 13a13780553d3d4599144629148fe9be3653293f [file]
// Copyright 2026 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build unix && !linux
package scratch
import "syscall"
func mmap(n int) ([]byte, error) {
return syscall.Mmap(-1, 0, n, syscall.PROT_READ|syscall.PROT_WRITE,
syscall.MAP_ANON|syscall.MAP_PRIVATE)
}
func munmap(b []byte) {
syscall.Munmap(b)
}