lang Module

The lang module exposes runtime introspection, manual garbage collection triggers, and heap memory statistics directly from the C engine.

Importing

djazair
use lang

API Reference

FunctionDescription
lang.gc()Triggers an immediate garbage collection mark-and-sweep cycle.
lang.memoryUsed()Returns current heap memory usage in bytes.
lang.version()Returns the Djazair interpreter version string (e.g. "1.1.0").
lang.platform()Returns the target runtime build architecture (e.g. "x86_64").

Example Usage

djazair
use lang

print("Engine Version: ${lang.version()}")
print("Heap before GC: ${lang.memoryUsed()} bytes")

# Force garbage collection cycle
lang.gc()

print("Heap after GC:  ${lang.memoryUsed()} bytes")