Jon Harrop <jon@[EMAIL PROTECTED]
> writes:
> As I understand it, MLKit is entirely region-based memory management and
the
> Stalin Scheme compiler uses similar techniques and this is fundamentally
> different from both reference counting and mark and sweep GC.
The ML-kit later got GC added on, but you can switch this off and use
regions exclusively.
> What are the implications of this technique and how well do the
compilers
> perform in practice? Does it suffer from stalls or keeping values alive
too
> long?
There are definitely space-leak issues with pure region-based
management. In my experience, you need to profile your code and
insert region annotations and a few explicit deep copies to get rid of
space leaks. This isn't as difficult as it may sound, and you
typically only have to do it in a few places, but you certainly can't
expect off-the-shelf ML programs to have good memory performance with
regions.
That said, once you get the annotations in place, ML programs with
regions usually require less memory than with GC (unless you keep the
heap so small that you trash it).
The study administration system at the IT University in Copenhagen
(which has Mads Tofte as headmaster) is implemented in ML and runs on
the ML-kit. It did that even before GC was added, so you can
certainly write significant programs that use regions exclusively.
Torben


|