bolt/bolt_unix.go | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
bolt/bolt_unix.go
@@ -3,7 +3,6 @@ package bolt import ( "fmt" "os" "syscall" "time" @@ -53,9 +52,10 @@ } // Advise the kernel that the mmap is accessed randomly. if err := madvise(b, syscall.MADV_RANDOM); err != nil { return fmt.Errorf("madvise: %s", err) } madvise(b, syscall.MADV_RANDOM) //if err := madvise(b, syscall.MADV_RANDOM); err != nil { // return fmt.Errorf("madvise: %s", err) //} // Save the original byte slice and convert to a byte array pointer. db.dataref = b