aboutsummaryrefslogtreecommitdiff
path: root/bolt_unix.go
diff options
context:
space:
mode:
authorBen Johnson <benbjohnson@yahoo.com>2015-11-12 08:10:49 -0700
committerBen Johnson <benbjohnson@yahoo.com>2015-11-12 08:10:49 -0700
commit0b00effdd7a8270ebd91c24297e51643e370dd52 (patch)
treea70349058cbdb731d702c02ef89627d2e5c7b40b /bolt_unix.go
parentMerge pull request #452 from benbjohnson/empty-seek (diff)
parentAdd MmapFlags option for MAP_POPULATE (unix) (diff)
downloaddedo-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.go')
-rw-r--r--bolt_unix.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/bolt_unix.go b/bolt_unix.go
index 6eef6b2..251680b 100644
--- a/bolt_unix.go
+++ b/bolt_unix.go
@@ -58,7 +58,7 @@ func mmap(db *DB, sz int) error {
}
// Map the data file to memory.
- b, err := syscall.Mmap(int(db.file.Fd()), 0, sz, syscall.PROT_READ, syscall.MAP_SHARED)
+ b, err := syscall.Mmap(int(db.file.Fd()), 0, sz, syscall.PROT_READ, syscall.MAP_SHARED|db.MmapFlags)
if err != nil {
return err
}