diff --git a/bolt_unix.go b/bolt_unix.go index d1922c2d9..faf7c9978 100644 --- a/bolt_unix.go +++ b/bolt_unix.go @@ -3,7 +3,6 @@ package bbolt import ( - "fmt" "syscall" "time" "unsafe" @@ -58,13 +57,6 @@ func mmap(db *DB, sz int) error { return err } - // Advise the kernel that the mmap is accessed randomly. - err = unix.Madvise(b, syscall.MADV_RANDOM) - if err != nil && err != syscall.ENOSYS { - // Ignore not implemented error in kernel because it still works. - return fmt.Errorf("madvise: %s", err) - } - // Save the original byte slice and convert to a byte array pointer. db.dataref = b db.data = (*[maxMapSize]byte)(unsafe.Pointer(&b[0]))