# helia_aot.memory.defines.MemoryConstraint

## helia_aot.memory.defines.MemoryConstraint

`class` · `python`

```python
MemoryConstraint()
```

User-defined memory constraint

Source: `helia_aot/memory/defines.py:319`

### helia_aot.memory.defines.MemoryConstraint.name

`attribute` · `python`

```python
name: MemoryType = Field(..., description='Memory type (e.g., DTCM, ITCM)')
```

Memory type (e.g., DTCM, ITCM)

Source: `helia_aot/memory/defines.py:342`

### helia_aot.memory.defines.MemoryConstraint.max_size

`attribute` · `python`

```python
max_size: int | None = Field(default=None, description='Maximum size in bytes, or None for no limit')
```

Maximum size in bytes, or None for no limit

Source: `helia_aot/memory/defines.py:343`

### helia_aot.memory.defines.MemoryConstraint.arena_alignment

`attribute` · `python`

```python
arena_alignment: int | None = Field(default=None, description='Optional per-arena alignment floor in bytes. When set, applied to both the arena base symbol and every slot. When None, only the 16-byte implementation floor applies to the base; per-slot alignment is driven by platform / dtype / tensor hints.')
```

Optional per-arena alignment floor
in bytes. When set, the planner uses
``max(arena_alignment, platform.min_alignment)`` for both
the arena base symbol and the per-slot offset of every
tensor packed into it. When ``None`` (the default), only
the implementation floor (16 bytes) is applied to the
arena **base** symbol; per-slot alignment continues to use
``max(platform.min_alignment, dtype_alignment_floor,
tensor.alignment_hint)`` so dtype-natural and
kernel-driven alignment are still honored. Bump
``arena_alignment`` above the default for memories that
back DMA-driven hydration paths needing stronger
alignment than the platform's MVE/Helium floor (e.g.
cacheline-sized PSRAM transfers).

Source: `helia_aot/memory/defines.py:344`
