lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Axel Kittenberger <axkibe@gmail.com> wrote:

> The last days, I've been thinking about Garbage Collection. However,
> I'm not experienced there, so I'd like to hear your opinion on this.

Have a look at this page if you are interested in GC:
http://www.cs.kent.ac.uk/people/staff/rej/gc.html

> But what if creating objects on the stack which are hardly referenced
> at all would be made cheap, than it would be okay to work like this.
> [...] Couldn't this be used as advantage for the GC?

Yes, there are a number of GC techniques that are optimised on the
assumption that most objects are short-lived, such as "generational GC".

> It would be some variant of a reference counter that only knows, "zero",
> "one" or "many" references.

That's another well-known technique :-)

Tony.
-- 
f.anthony.n.finch  <dot@dotat.at>  http://dotat.at/
Viking, North Utsire, South Utsire, Northeast Forties: Easterly or
southeasterly 5 to 7, occasionally gale 8 at first except in North Utsire,
veering southerly 4 or 5. Moderate or rough becoming slight or moderate. Rain
with fog patches then fair. Moderate or good, occasionally very poor at first.