LibTTAK is a C systems collection that moves lifetime management from control flow logic into the data model. In traditional C, memory safety relies on the programmer correctly ordering `free()` calls. Even in C++ or Rust, while RAII and ownership rules automate this, the logic still lives in the control flow. LibTTAK encodes the lifetime directly into the allocation. Key features: Lifetime as data: Every allocation has an explicit expiry. Access validation: `ttak_mem_access(ptr, tick)` enforces expiry checks at the data level. Minimalistic cleanup: No GC, but automatically frees memory with an interval, which can be turned off. Also, the user can manually clean up targeted pointers. Operational coupling: Simplifies staged shutdowns and subsystem boundaries by grouping allocations under a single lifetime. The goal is to provide the safety of deterministic cleanup without the overhead of a garbage collector or the complexity of complex ownership tracking. |