Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FileDesc ¶
type FileDesc struct {
// file is the *os.File ref to store
File **os.File
// bytes is the []byte slice ref to store the mmap'd address
Bytes *[]byte
// options specifies options to use when mmaping a file
Options Options
}
FileDesc contains the fields required for Mmaping a file using MmapFiles
type FileOpener ¶
FileOpener is the signature of a function that MmapFiles can use to open files
type FilesResult ¶
type FilesResult struct {
Warning error
}
FilesResult contains the result of calling MmapFiles
func Files ¶
func Files(opener FileOpener, files map[string]FileDesc) (FilesResult, error)
Files is a utility function for mmap'ing a group of files at once
type HugeTLBOptions ¶
type HugeTLBOptions struct {
// enabled determines if using the huge TLB flag is enabled for platforms
// that support it
Enabled bool
// threshold determines if the size being mmap'd is greater or equal
// to this value to use or not use the huge TLB flag if enabled
Threshold int64
}
HugeTLBOptions contains all options related to huge TLB
type Options ¶
type Options struct {
// read is whether to make mmap bytes ref readable
Read bool
// write is whether to make mmap bytes ref writable
Write bool
// hugeTLB is the mmap huge TLB options
HugeTLB HugeTLBOptions
}
Options contains the options for mmap'ing a file
Click to show internal directories.
Click to hide internal directories.