An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

code.hybscloud.com/iobuf

Package iobuf provides lock-free buffer pools and memory management utilities for high-performance I/O operations. The package implements a 12-tier buffer size hierarchy and lock-free bounded pools optimized for zero-allocation hot paths. All pools use semantic error types from iox for non-blocking control flow. Buffers are organized into 12 size tiers following a power-of-4 progression: Each tier has corresponding type aliases (e.g., SmallBuffer, LargeBuffer) and factory functions for bounded pools (e.g., NewSmallBufferPool). BoundedPool is a lock-free multi-producer multi-consumer (MPMC) pool based on the algorithm from "A Scalable, Portable, and Memory-Efficient Lock-Free FIFO Queue" (Ruslan Nikolaev, 2019). Key characteristics: Pools store indices (int) rather than buffer values directly. This enables: Usage pattern: For DMA and io_uring operations requiring page alignment: IoVec provides scatter/gather I/O support for readv/writev syscalls: This package requires a 64-bit CPU architecture (amd64, arm64, riscv64, loong64, ppc64, ppc64le, s390x, mips64, mips64le). 32-bit architectures are not supported due to 64-bit atomic operations in BoundedPool. All pool operations are safe for concurrent use. BoundedPool supports multiple concurrent producers and consumers without external synchronization. iobuf depends on:

Ecosystem
proxy.golang.org
Latest Release
v0.3.1
24 days ago
Versions
7
Links
Registry proxy.golang.org
Homepage Homepage
Docs Documentation
JSON API View JSON
CodeMeta codemeta.json
Package Details
PURL pkg:golang/code.hybscloud.com/iobuf
spec
License MIT
Namespace code.hybscloud.com
First Release 3 months ago
Last Synced 4 days ago
Rankings on proxy.golang.org
Overall Top 5.2%