caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jon Harrop <jon@ffconsultancy.com>
To: caml-list@yquem.inria.fr
Subject: HLVM is now garbage collected!
Date: Sun, 8 Mar 2009 01:19:20 +0000	[thread overview]
Message-ID: <200903080119.20330.jon@ffconsultancy.com> (raw)


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


             reply	other threads:[~2009-03-08  1:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-08  1:19 Jon Harrop [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200903080119.20330.jon@ffconsultancy.com \
    --to=jon@ffconsultancy.com \
    --cc=caml-list@yquem.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).