align

package
v3.0.0-...-66753ca Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2023 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

Package align provides helpers for doing uint alignment.

alignment is done via bit operation at the moment, so alignment size need be a power of 2.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Down

func Down(v uint, alignSize uint) uint

Down aligns v down to a previous multiple of alignSize.

alignSize need be a power of 2.

func DownPage

func DownPage(v uint) uint

DownPage aligns v down by system page size.

func Up

func Up(v uint, alignSize uint) uint

Up aligns v up to next multiple of alignSize.

alignSize need be a power of 2.

func UpPage

func UpPage(v uint) uint

UpPage aligns v up by system page size.

Types

This section is empty.

Jump to

Keyboard shortcuts

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