VM Lifecycle & Memory Configuration
Learn how to customize callbacks, manage garbage collection, pass CLI arguments, and isolate multiple concurrent VM instances.
Core C API Functions
| C Function | Return Type | Description |
|---|---|---|
djazair_newVM(config) | DjazairVM* | Creates a new isolated virtual machine instance. |
djazair_freeVM(vm) | void | Destroys VM and frees all heap allocations. |
djazair_interpret(vm, code) | DjazairResult | Executes source code string. |
djazair_interpret_file(vm, path) | DjazairResult | Executes a .dz script file from disk. |
djazair_gc(vm) | void | Forces an immediate garbage collection sweep. |
djazair_memory_allocated(vm) | size_t | Returns current allocated heap size in bytes. |