mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-13 06:47:28 -08:00
17 lines
282 B
Go
17 lines
282 B
Go
// +build !windows,!plan9,!solaris
|
|
|
|
package tsdb
|
|
|
|
import (
|
|
"os"
|
|
"syscall"
|
|
)
|
|
|
|
func mmap(f *os.File, length int) ([]byte, error) {
|
|
return syscall.Mmap(int(f.Fd()), 0, length, syscall.PROT_READ, syscall.MAP_SHARED)
|
|
}
|
|
|
|
func munmap(b []byte) (err error) {
|
|
return syscall.Munmap(b)
|
|
}
|