zhangzengfei
2022-10-18 a13b0a9f5ea78270c4c614865407442748e349be
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