Documentation
¶
Index ¶
- Constants
- Variables
- func Fallocate_simple(fd int, size int64) (err error)
- func RandomFilename() string
- func Read(self MMap, b []byte) (n int, err error)
- func ReadWithSize(self MMap, at int) ([]byte, error)
- func ReadWithSizeAndUnlink(name string, file_callback ...func(fs.FileInfo) error) ([]byte, error)
- func ShmUnlink(name string) error
- func UnsafeBytesToString(b []byte) (s string)
- func UnsafeStringToBytes(s string) (b []byte)
- func Write(self MMap, b []byte) (n int, err error)
- func WriteWithSize(self MMap, b []byte, at int) error
- type AccessFlags
- type ErrNotSupported
- type MMap
Constants ¶
View Source
const NUM_BYTES_FOR_SIZE = 4
View Source
const SHM_DIR = "/dev/shm"
Variables ¶
View Source
var ErrPatternHasSeparator = errors.New("The specified pattern has file path separators in it")
View Source
var ErrPatternTooLong = errors.New("The specified pattern for the SHM name is too long")
View Source
var ErrRegionTooSmall = errors.New("mmaped region too small")
Functions ¶
func Fallocate_simple ¶
func RandomFilename ¶
func RandomFilename() string
func ReadWithSizeAndUnlink ¶
func UnsafeBytesToString ¶
Unsafely converts b into a string. If you modify b, then s will also be modified. This violates the property that strings are immutable.
func UnsafeStringToBytes ¶
Unsafely converts s into a byte slice. If you modify b, then s will also be modified. This violates the property that strings are immutable.
Types ¶
type ErrNotSupported ¶
type ErrNotSupported struct {
// contains filtered or unexported fields
}
func (*ErrNotSupported) Error ¶
func (self *ErrNotSupported) Error() string
type MMap ¶
Click to show internal directories.
Click to hide internal directories.