# `Alternera.Plugin.Provisional.StepHeap`
[🔗](https://github.com/10e-ab/alternera-sdk/blob/v0.9.0/alternera_plugin_sdk/lib/alternera/plugin/provisional/step_heap.ex#L1)

The heap a step's process may reach while it holds a body. The runner limits
a plugin's body phase with it when the body is past the inline threshold, and
`Plugins.Script.Sandbox` limits every Script run, which is why a body-sized
limit has a floor: a small body still gets room for the script's own work.

The floor (16 Mi words, 128 MiB on a 64-bit VM) and the factor (16 words a
byte) are fixed in production. `config :alternera_plugin_sdk, :step_heap,
floor_words: …, words_per_byte: …` changes them, which only a test does: no
body within a limit can reach the floor otherwise, so the kill could not be
checked.

# `floor_words`

```elixir
@spec floor_words() :: pos_integer()
```

The limit whatever the body's size, in words.

# `max_words`

```elixir
@spec max_words(non_neg_integer()) :: pos_integer()
```

The limit of a step on a body of `body_bytes`, in words.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
