Documentation ¶
Overview ¶
Package aligned provides functions to allocate cacheline-aligned variables, with the additional guarantee that no other variables anywhere in the process can use the same cacheline: this is mostly useful when using functions from sync/atomic to minimize the probability of false sharing of cachelines.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Int128 ¶
func Int128() *[2]int64
Int128 returns a cacheline-aligned contiguous pair of int64 that is guaranteed not to share the cacheline with any other data.
func Int32 ¶
func Int32() *int32
Int32 returns a cacheline-aligned int32 that is guaranteed not to share the cacheline with any other data.
func Int64 ¶
func Int64() *int64
Int64 returns a cacheline-aligned int64 that is guaranteed not to share the cacheline with any other data.
func Uint128 ¶
func Uint128() *[2]uint64
Uint128 returns a cacheline-aligned contiguous pair of uint64 that is guaranteed not to share the cacheline with any other data.
func Uint32 ¶
func Uint32() *uint32
Uint32 returns a cacheline-aligned uint32 that is guaranteed not to share the cacheline with any other data.
Types ¶
This section is empty.