Documentation
¶
Index ¶
- Constants
- func Ftruncate(fd int, size int64) error
- func Madvise(b []byte, advice int) error
- func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error)
- func Munmap(addr []byte) error
- func SchedYield() error
- func Shm_Open(name string, flag int, perm os.FileMode) (int, error)
- func Shm_Unlink(name string) error
- type ShmBuffer
- type ShmHeader
Constants ¶
View Source
const ( BATCH_NOTIFY = 32 // 批量通知大小 BUFFER_SIZE = 1 << 10 // 1kb/缓冲区 BUF_COUNT = 1024 // 环形缓冲区数量 CACHE_LINE = 64 // 缓存行大小 Timeout = 500 // 毫秒 MEM_SIZE = int(unsafe.Sizeof(ShmHeader{})) + BUF_COUNT*int(unsafe.Sizeof(ShmBuffer{})) )
View Source
const ( PROT_READ = 0x1 PROT_WRITE = 0x2 MAP_SHARED = 0x1 MAP_LOCKED = 0x2000 MADV_HUGEPAGE = 0xe )
Variables ¶
This section is empty.
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.