[Gc] gc and iphone / xcode

Bruce Hoult bruce at hoult.org
Thu Jun 4 16:29:32 PDT 2009

On Fri, Jun 5, 2009 at 11:09 AM, Joseph Rukshan Fonseka
<ruki at rukispot.com> wrote:
> Hello.
> I have a large java application that I am converting to C++. I have
> discovered that correct memory deallocation is going to be a nightmare
> simply because of the nature of the Java language as it supports garbage
> collection.
> I discovered the gc library and wish to use it.
> My question is has anyone been able to use this library in xcode for the
> iphone? The new code will be written in objective-C however the existing
> Java code I am porting to C++.  How do I set up my project to use the
> library?

There are apps in the AppStore using the GC but it does not work out
of the box. Darwin is supported on PowerPC and x86, but not ARM.  ARM
is supported on Linux, but not on Darwin.

It's not a big deal and I filled in the missing support at a previous
job. Naturally I don't have that code now (and was not allowed to
contribute it back) but mostly it wasn't hard -- just look for the
places that conditionalize on PowerPC and x86 for Darwin and add an
ARM case.

The one thing I couldn't figure out (or didn't have time) was how to
parse the stack frames. So I just made it so that client code had to
call a function to register the stack base for each new thread it

More information about the Gc mailing list