aligned

package module
v0.0.0-...-a5a1de8 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2020 License: MIT Imports: 3 Imported by: 0

README

aligned

Allocate cacheline-aligned variables for use with sync/atomic.

See documentation for details.

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.

func Uint64

func Uint64() *uint64

Uint64 returns a cacheline-aligned uint64 that is guaranteed not to share the cacheline with any other data.

func Uintptr

func Uintptr() *uintptr

Uintptr returns a cacheline-aligned uintptr that is guaranteed not to share the cacheline with any other data.

Types

This section is empty.

Jump to

Keyboard shortcuts

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