Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ReadWriterAt ¶
ReadWriterAt is an interface for reading from/writing to a byte slice like data source (e.g., a file or disk).
func MemoryMapBlockDevice ¶
func MemoryMapBlockDevice(path string) (ReadWriterAt, int, int64, error)
MemoryMapBlockDevice maps the entire contents of a block device into the address space of the current process. Access to the memory map is provided in the form of an io.ReaderAt/io.WriterAt.
The sector size of the block device and the total number of sectors are also returned. It may be assumed that these remain constant over the lifetime of the block device and process.
Writes may only occur at sector boundaries, as unaligned writes would cause unnecessary read operations against underlying storage.
Click to show internal directories.
Click to hide internal directories.