|
short answer: if I have less than 892302.1 kbytes (lua 5.2/5.3) then that very simple script doesn't finish correctly. Is this really what you expect it to? (I don't)
long answer:1) first 'for' means: a lot of work for GC manage (dozens Gbytes), consuming almost all we have of free memory.2) second 'for' means: perform a lot of complex tasks for many hours/days that also create a lot of small (~ Kbytes) GCed temporary objects at a high rate.3) go to the short answer.Yes, that is a "toy model" but I also observed the same trends testing with some 'real' (long answer) programs, so that is a valid model.Observe the attached files for an updated teste2.lua program and also the resulting graph showing the memory usage for lua-5.2.4 generational GC, lua-5.3.4 and github codes. What did you expect it to?