Core Strengths: The Ownership Graph
One of the most striking features of the Galfus ecosystem is its unique approach to memory management.
Unlike many modern scripting languages, Galfus does not have a traditional Garbage Collector (GC) that runs in cycles looking for orphaned objects in memory. Instead, it relies on a deterministic model that provides predictable performance.
Deterministic Management
Instead of relying on the unpredictable latency of a background collector (like Mark-and-Sweep cycles), the language was architected under an Ownership Graph model.
- Exact Traceability: Every resource instantiated or allocated in Galfus has exact traceability of who "owns" it.
- Cycle-Free Release: The release of a resource follows a trail through the graph, unattached to global sweeping "cycles".
- Instant Deallocation: When the root variable holding the ownership of a data instance goes out of scope (or undergoes destructive mutation without passing ownership), the language deallocates the underlying structure instantly and deterministically.
Practical Impact
This architectural decision has several major benefits for the developer and the host system:
1. Absolute Predictability
The virtual machine will never make sudden pauses ("Stop the World") to clean up garbage. This predictability is critical for embedded environments like Firmwares, Real-Time Operating Systems (RTOS), or physical simulators and game engines where frame times matter.
2. Clear Lifecycle
If complex reference cycles exist, they must be broken semantically or by using weak references. This forces the programmer to design healthy data models at the source, eliminating invisible burdens on the host application.
3. Constant Isolation
Deallocation occurs in parallel with the normal execution of the Virtual Thread. This keeps the memory footprint (RAM consumption) as small as possible by discarding garbage as soon as it becomes obsolete, without waiting for the heap to reach a certain threshold.
By prioritizing deterministic execution, the Ownership Graph ensures that Galfus scripts remain respectful of the host system's resources and timing constraints.