OvumDocs

Memory Management and Runtime

One of Ovum’s core principles is memory safety. Memory is managed by the runtime’s garbage collector (GC), which automatically frees objects that are no longer in use, eliminating whole classes of bugs like dangling pointers, memory leaks, and buffer overruns.

Automatic Memory Management

Just-In-Time Compilation

Runtime, VM & Platform Support

The Ovum compiler translates Ovum source code into Ovum bytecode or an intermediate representation, which is executed on the Ovum Virtual Machine (OVM). The OVM provides a sandboxed, platform-independent environment for Ovum programs.

Development Workflow

  1. Write Ovum source code in .ovum files
  2. Compile using the Ovum compiler, which will:
    • Parse using the grammar rules
    • Type-check (ensure types match and all variables are defined)
    • Enforce const/pure rules
    • Produce bytecode or an executable
  3. Execute using the Ovum VM, which will:
    • Load the bytecode
    • Resolve any imports (linking together modules)
    • Start executing (usually beginning with Main(args: StringArray): Int)
    • Apply JIT optimization to hot code paths
    • Manage memory with garbage collection

Platform Requirements

Execution Characteristics