Re:How the embeddability of Lua impacted its design (2011)
by mwkaufma on Friday December 29, 2017 @08:52PM
(#16033331)
There's a collection of c-exposed values called the api stack (not to be confused with the function stack). The stack keeps them from being collected, so there's no need for ref counting. OP writes about this.
OP doesn't write much about the GC itself, but I can tell you a little from my dayjob-using-lua experience. It's mark'n'sweep, but (i) it's narrowly tailored for lua tables, not general purpose allocations, and (ii) it's incremental, so you can cap individual pause times and amortise (imp for games).
OP doesn't write much about the GC itself, but I can tell you a little from my dayjob-using-lua experience. It's mark'n'sweep, but (i) it's narrowly tailored for lua tables, not general purpose allocations, and (ii) it's incremental, so you can cap individual pause times and amortise (imp for games).