system

package
v1.0.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 1, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BATCH_NOTIFY = 32      // 批量通知大小
	BUFFER_SIZE  = 1 << 20 // 1mb/缓冲区
	BUF_COUNT    = 1024    // 环形缓冲区数量
	CACHE_LINE   = 64      // 缓存行大小
	MEM_SIZE     = int(unsafe.Sizeof(ShmHeader{})) + BUF_COUNT*int(unsafe.Sizeof(ShmBuffer{}))
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ShmBuffer

type ShmBuffer struct {
	ReqId  uint64            `json:"req_id"`
	Length uint32            `json:"length"`
	Data   [BUFFER_SIZE]byte `json:"data"`
}

type ShmHeader

type ShmHeader struct {
	WriteIdx uint64 `json:"write_idx"`

	ReadIdx uint64 `json:"read_idx"`

	Futex int32 `json:"futex"`
	// contains filtered or unexported fields
}

func GetShmPointers

func GetShmPointers(addr uintptr) (*ShmHeader, *[BUF_COUNT]ShmBuffer)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL