github.com/flower-corp/rosedb@v1.1.2-0.20230117132829-21dc4f7b319a/mmap/mmap_plan9.go (about)

     1  package mmap
     2  
     3  import (
     4  	"os"
     5  	"syscall"
     6  )
     7  
     8  // Mmap uses the mmap system call to memory-map a file. If writable is true,
     9  // memory protection of the pages is set so that they may be written to as well.
    10  func mmap(fd *os.File, writable bool, size int64) ([]byte, error) {
    11  	return nil, syscall.EPLAN9
    12  }
    13  
    14  // Munmap unmaps a previously mapped slice.
    15  func munmap(b []byte) error {
    16  	return syscall.EPLAN9
    17  }
    18  
    19  // Madvise uses the madvise system call to give advise about the use of memory
    20  // when using a slice that is memory-mapped to a file. Set the readahead flag to
    21  // false if page references are expected in random order.
    22  func madvise(b []byte, readahead bool) error {
    23  	return syscall.EPLAN9
    24  }
    25  
    26  func msync(b []byte) error {
    27  	return syscall.EPLAN9
    28  }