get_unaligned
Prev | Atomic and pointer manipulation | Next

## Name

get_unaligned — get value from possibly mis-aligned location

## Synopsis

`get_unaligned (` |  | ptr`)`;

## Arguments

`ptr`

  pointer to value

## Description

This macro should be used for accessing values larger in size than single bytes at locations that are expected to be improperly aligned, e.g. retrieving a u16 value from a location not u16-aligned.

Note that unaligned accesses can be very expensive on some architectures.

Prev | Up | Next
atomic_add_unless | Home | put_unaligned