caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* HLVM is now garbage collected!
@ 2009-03-08  1:19 Jon Harrop
  2009-03-08  2:45 ` [Caml-list] " Jon Harrop
  2009-03-13 13:49 ` Jon Harrop
  0 siblings, 2 replies; 15+ messages in thread
From: Jon Harrop @ 2009-03-08  1:19 UTC (permalink / raw)
  To: caml-list


Well, I have my first working GC running in HLVM now! Woohoo!

The implementation has some interesting properties:

. The GC is written entirely in HLVM's own intermediate language.

. When a new type is defined a new function to traverse that type is JIT 
compiled. So code for the GC is generated on-the-fly.

. The GC is very simple and uses a shadow stack to track roots and an 
allocated list that stores all heap allocated locations and their mark bit.

. When the GC gets involved, performance is currently awful. Two simple 
optimizations will go a long way to curing this: touch the shadow stack only 
when necessary, and do something cleverer than the current linear lookup (!) 
of allocated pointers in the GC.

. When the heap is deep the current GC stack overflows because it is not tail 
recursive. This is easily fixed.

I have applied to the OCaml Forge to create a new project for HLVM where I 
will upload my initial prototype. Just as soon as my French gets good enough 
to understand this automated e-mail... ;-)

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


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2009-03-20  2:14 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-08  1:19 HLVM is now garbage collected! Jon Harrop
2009-03-08  2:45 ` [Caml-list] " Jon Harrop
2009-03-08  9:35   ` Richard Jones
2009-03-09  4:13     ` Jon Harrop
2009-03-09  9:04       ` HLVM numerical performance Jan Kybic
2009-03-09 11:37         ` [Caml-list] " Jon Harrop
2009-03-09 11:53           ` Jon Harrop
2009-03-09 12:55       ` [Caml-list] HLVM is now garbage collected! Richard Jones
2009-03-08  9:43   ` Joel Reymont
2009-03-08 10:21     ` Sylvain Le Gall
2009-03-08 10:54       ` Sylvain Le Gall
2009-03-09  4:11     ` [Caml-list] " Jon Harrop
2009-03-13 13:49 ` Jon Harrop
2009-03-13 20:40   ` Mikkel Fahnøe Jørgensen
2009-03-20  2:20     ` Jon Harrop

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).