Documentation
¶
Index ¶
- Variables
- func NewFixedBuffer(f file, bufSize int) (*fixedbuffer, error)
- type ZeroMmap
- func (zm *ZeroMmap) Close() error
- func (zm *ZeroMmap) NextAt(offset int64, n int) ([]byte, error)
- func (zm *ZeroMmap) ReadAt(offset int64, n int) ([]byte, error)
- func (zm *ZeroMmap) Size() int64
- func (zm *ZeroMmap) Sync() error
- func (zm *ZeroMmap) Truncate(size int64) error
- func (zm *ZeroMmap) WriteBack() error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
OsPageSize = os.Getpagesize()
)
Functions ¶
func NewFixedBuffer ¶
Types ¶
type ZeroMmap ¶
type ZeroMmap struct {
// contains filtered or unexported fields
}
concurrent operations are unsafe
func NewZeroMmap ¶
func (*ZeroMmap) NextAt ¶
NextAt 从offset处获取n个字节,如果参数合法,则获取到bytes长度一定为n, offset可以比当前文件的size大,获取的bytes用于写入数据
Click to show internal directories.
Click to hide internal directories.