Allocate - HACKT Tutorials
Description: HACKT Tutorials

Next: Instance Dump, Previous: Create, Up: Compiler

### 2.4 Allocate

The alloc phase expands the entire instance hierarchy top-down, so that every unique instance has its own state in memory. The input object file is the result of `haccreate`, but will automatically run create on the object file if necessary.

— Program: hacalloc in-object out-object

> Further compiles an object file through the alloc phase.

`hacalloc` is provided as a single-command alias to `hackt alloc`. `hacalloc` supports the same options as `haccreate`.

In summary, the create, and allocate compile phases automatically run the necessary prerequisite phases where needed. All developed tools should also implement this behavior.