# MemoryRegionSet

`import { MemoryRegionSet } from "destack:sync";`

Effect regions participating in an atomic operation.

```ds title="MemoryRegionSet"
export enum MemoryRegionSet {
    None = 0,
    Arguments = 1,
    Heap = 2,
    Stack = 4,
    Global = 8,
    Shared = 16,
    Local = 32,
    Constant = 64,
    Inaccessible = 128,
    Io = 256,
    Any = 511,
}
```

[language/library/src/sync/atomic.ds:62:85](https://github.com/destack-sh/destack/blob/main/language/library/src/sync/atomic.ds#L62-L85)

## Variants

### `None = 0`

No memory locations.

### `Arguments = 1`

Memory reachable from pointer arguments.

### `Heap = 2`

Heap allocated memory.

### `Stack = 4`

Stack memory.

### `Global = 8`

Global or static memory.

### `Shared = 16`

Shared or workgroup memory.

### `Local = 32`

Target local or thread local memory.

### `Constant = 64`

Target constant or read only memory.

### `Inaccessible = 128`

Inaccessible memory that cannot be aliased.

### `Io = 256`

Memory mapped IO or other side channel memory.

### `Any = 511`

All memory locations.
