The default garbage collection trigger threshold in newVM() is raised from 1024*1024 (1MB) to 1024*1024*10 (10MB) to reduce GC frequency for larger workloads. Additionally, the DEBUG_GC_STRESS macro in common.h is commented out to disable stress-test GC collections on every allocation by default.
Replace manual malloc/free for Obj allocations with GC-managed heap. Add Obj->next linked list, markObj traversal for all object types, and sweep phase in VM. Introduce MAX_PINNED stack for temporary GC roots during compilation. Refactor all object constructors (newBool, newFunction, newClass, newNum, newString) to accept VM pointer and register allocations. Move function constant registration earlier in compiler to ensure GC reachability. Add DEBUG_GC_STRESS and TRACE_MEMORY macros in new common.h header.