[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Single-Reference-Mark-GC? (or 0-1-many-counter)
- From: Stefan Marr <lua@...>
- Date: Wed, 24 Aug 2011 15:42:01 +0200
On 24 Aug 2011, at 15:13, Axel Kittenberger wrote:
> 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.
> Thinking of the average project, I didn't run any tests yet, but my
> gut feeling says, the majority of tables is referenced only once,
> isn't it?
Objects die young, that is the major assumption behind generational GCs.
You might like the following list of papers:
Other keywords you might be interested in are escape analysis and allocation sinking.
And there are more fancy things around.
As far as I understand, Lua5.1 uses a three-color incremental GC to avoid expensive full GC.
In real-time systems they do scratchpad allocation, which basically means, have a fixed chunk of memory which is discarded entirely after use. One has to be care full to not having any pointers escaping from that of course.
Hope that gives you some pointers to start from.
Software Languages Lab
Vrije Universiteit Brussel
Pleinlaan 2 / B-1050 Brussels / Belgium
Phone: +32 2 629 2974
Fax: +32 2 629 3525