lua-users home
lua-l archive

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


That sounds great... and easy to implement too.  I think you'd see a massive
reduction in garbage with complex scripts as a result.

With a mix of that and maybe expanding the default "number" to be an 96-bit
quantity that can hold vectors as RLake (Rici Lake? middle-america suburban
white woman's chat show?  Nah... can't be...)  suggested, I think I could
get Lua to work how I want it to.  I probably will need progressive or timed
garbage collection towards the end of the project though. (ie. I simply want
to use up any spare time at the end of the frame to garbage collect)

Regards

---------------------------------
Q-Games, Dylan Cuthbert.
http://www.q-games.com

<RLake@oxfam.org.pe> wrote in message
OF9EDD709D.C6009574-ON05256D58.0059E4A6@oxfam.org.uk">news:OF9EDD709D.C6009574-ON05256D58.0059E4A6@oxfam.org.uk...
Mark Hamburg escribió:

> A simplistic approach to garbage collection for temporaries. This is a
> simplified version of the zero-reference-count table optimization for
> reference counting.

Interesting idea.

Here is an even simpler version:

Put a refcount bit in every lua_Object.

1) When a new object is created (and put on the stack), the bit is off.

2) Just before any object is copied from the stack to anywhere else,
   the bit is unconditionally set.

3) If a stack slot is overwritten and the refcount bit for the object
   being overwritten is off, the object can be immediately deleted.