Source File
mlock_unix.go
Belonging Package
go.etcd.io/bbolt
// +build !windowspackage bboltimport// mlock locks memory of db filefunc mlock( *DB, int) error {:=if > .datasz {// Can't lock more than mmaped slice= .datasz}if := unix.Mlock(.dataref[:]); != nil {return}return nil}//munlock unlocks memory of db filefunc munlock( *DB, int) error {if .dataref == nil {return nil}:=if > .datasz {// Can't unlock more than mmaped slice= .datasz}if := unix.Munlock(.dataref[:]); != nil {return}return nil}
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |