Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Fat references

0 views
Skip to first unread message

Jon Harrop

unread,
Dec 29, 2009, 12:55:58 PM12/29/09
to

I've been working on a project called HLVM in my spare time:

http://forge.ocamlcore.org/projects/hlvm

One goal was to have fast interop with C, so I didn't want to copy the
traditional style of placing a header with GC metadata before every value
in the heap because that would require C arrays to be copied just to add
this header. I couldn't be bothered to allocate a separate header so,
instead, I pulled the GC metadata into the reference. So my references are
now "fat": a quadword of pointer to run-time type, array length or union
type tag, pointer to mark state and pointer to the actual data itself.

This actually works rather well except I sacrificed atomic read/write of
references. Has it been done before?

--
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/?u

0 new messages