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 
}

Plus, one Judy array mapping pointers to object length in bytes.
The real overhead is 5+ words since 3 words is rounded up to 4
to ensure a long double float is properly aligned on a 2 word
boundary.

I propose to eliminate the header completely. [This also means
an object malloc()ed by ordinary C code can be handed over to the
GC provided the required information is supplied.]

I propose three Judy arrays. One maps each pointer to its shape.
The shape contains the base object length. One bit indicates
if the heap object is an array. If so, two more Judy arrays
are used to contain the total number of slots, and the number
of used slots.

This reduces the overhead per non-array heap object to one
machine word (plus the Judy array .. I don't know what the
overhead is, but I think log 64 or log 32 is probably right).


-- 
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