Re: Plug and play concurrent GC

gneuner <>
Wed, 16 Apr 2008 20:36:57 -0700 (PDT)

          From comp.compilers

Related articles
Plug and play concurrent GC (Jon Harrop) (2008-04-09)
Re: Plug and play concurrent GC (gneuner) (2008-04-16)
Re: Plug and play concurrent GC (2008-04-17)
| List of all articles for this month |

From: gneuner <>
Newsgroups: comp.compilers
Date: Wed, 16 Apr 2008 20:36:57 -0700 (PDT)
Organization: Compilers Central
References: 08-04-033
Keywords: GC
Posted-Date: 17 Apr 2008 22:34:21 EDT

On Apr 9, 4:46 am, Jon Harrop <> wrote:
> I am interested in writing simple compilers for high-level programming
> languages using LLVM. However, I have been unable to find any concurrent
> GCs that could be used like this.
> Where can I find reliable reusable concurrent GC implementations? Does Sun's
> open source code include their Java VM's concurrent GC?

Hi Jon,

I don't know offhand if Sun publishes the source to their concurrent
GC, but it would likely not help you even if they did. Hoping someone
will come along and prove me wrong, I'm going to go out on a limb and
say you won't be able to find any easily reusable implementation

Collectors are very tightly bound to the language runtime and are
usually developed in concert with it. LLVM provides hooks around
which to create a collector, but you won't find one that can simply be
dropped in ... it has to be written specifically for the hooks
provided and the language being implemented. It isn't sufficient for
the runtime to simply provide read/write barriers and call hooks - the
collector has to understand all the runtime data structures and user
data types it may encounter and thus it has to be tailored for the
language and runtime implementation. For example, the JVM GC
understands only Java types and the .NET GC understands only CLR types
- any foreign language implemented on those VMs must be translated to
be compatible with their raw type schemes.

There are some decent kits available (such as MPS which could help you in
creating your own collector for LLVM, but I'm not aware of any kit
supporting true concurrency out of the box ... serial interleaved
collection is as far as I've seen any kit go. You'd need to do some
significant glue work and figure out the concurrent aspects yourself.

Sorry for the bucket of cold water - I hope somebody else can warm it
provider is comcast net, user is gneuner2

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.