On Sat, 2007-08-11 at 01:01 +1000, skaller wrote:
> GC is now committed to Judy. One pointer is removed, so we're
> down to this header:
> 
> /// Heap Frame header
> struct frame_t
> {
>   gc_shape_t *shape;       // the shape of each object
>   unsigned long n_objects; // how many slots max 
>   unsigned long n_used;    // how many slots used 
> }

> I propose to eliminate the header completely. 

This is now done. Non-arrays now have one word GC overhead,
consisting of a shape pointer with a 1 bit flag in the low bit
for the mark/sweep operation. Arrays have an additional 2 words
for their maximum length and used length. All 3 of these data are
stored in separate JudyL arrays (so the digital indicies have
overhead too, but I don't know how much).

Two mods to finalisers I've thought of.

1. Type based ordering. Eg, finalise all file locks before
   closing any files.

2. Dynamic finalisers. These can be attached dynamically to
objects. An unreachable object with a dynamic finaliser is
not finalised. Instead the dynamic finaliser is run. This can
make the object reachable again, so the object isn't statically
finalised or deleted until the next collection (by which time
another dynamic finaliser might have been attached to it).



-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to