zhangzengfei
2022-10-18 a13b0a9f5ea78270c4c614865407442748e349be
fix armv7 init
1个文件已修改
8 ■■■■ 已修改文件
bolt/bolt_unix.go 8 ●●●● 补丁 | 查看 | 原始文档 | 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