diff options
author | Ben Johnson <benbjohnson@yahoo.com> | 2015-11-12 08:10:49 -0700 |
---|---|---|
committer | Ben Johnson <benbjohnson@yahoo.com> | 2015-11-12 08:10:49 -0700 |
commit | 0b00effdd7a8270ebd91c24297e51643e370dd52 (patch) | |
tree | a70349058cbdb731d702c02ef89627d2e5c7b40b /bolt_unix_solaris.go | |
parent | Merge pull request #452 from benbjohnson/empty-seek (diff) | |
parent | Add MmapFlags option for MAP_POPULATE (unix) (diff) | |
download | dedo-0b00effdd7a8270ebd91c24297e51643e370dd52.tar.gz dedo-0b00effdd7a8270ebd91c24297e51643e370dd52.tar.xz |
Merge pull request #455 from gyuho/boltdb_unix_map_populate
Add MmapFlags option for MAP_POPULATE (unix)
Diffstat (limited to 'bolt_unix_solaris.go')
-rw-r--r-- | bolt_unix_solaris.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bolt_unix_solaris.go b/bolt_unix_solaris.go index f480ee7..214009b 100644 --- a/bolt_unix_solaris.go +++ b/bolt_unix_solaris.go @@ -1,4 +1,3 @@ - package bolt import ( @@ -7,6 +6,7 @@ import ( "syscall" "time" "unsafe" + "golang.org/x/sys/unix" ) @@ -68,7 +68,7 @@ func mmap(db *DB, sz int) error { } // Map the data file to memory. - b, err := unix.Mmap(int(db.file.Fd()), 0, sz, syscall.PROT_READ, syscall.MAP_SHARED) + b, err := unix.Mmap(int(db.file.Fd()), 0, sz, syscall.PROT_READ, syscall.MAP_SHARED|db.MmapFlags) if err != nil { return err } |