Page 1 of 1

Is Boehm Garbage Collector available on OS4 ?

PostPosted: Mon Dec 03, 2018 3:17 pm
by frederick
Hello everybody,

I'm wondering if the Boehm GC is available under OS4. I saw references to Amiga in the project, but I suspect them to be related to OS3.
Are there any running incarnations of it available ?

Thanks !

Re: Is Boehm Garbage Collector available on OS4 ?

PostPosted: Tue Dec 04, 2018 12:06 am
by tonyw
No. (Unless you can find a private version on OS4Depot or Aminet).

What is it used for?

Re: Is Boehm Garbage Collector available on OS4 ?

PostPosted: Tue Dec 04, 2018 10:29 am
by frederick
My idea was to evaluate the "Portable Object Compiler" Obj-C compiler with its runtime library.
This runtime library can use the boehm-gc, as it is definitely more convenient to use than object manual reference counting. :-)

Re: Is Boehm Garbage Collector available on OS4 ?

PostPosted: Wed Dec 05, 2018 12:12 am
by tonyw
So, it's a replacement for gcc++'s GC?

Re: Is Boehm Garbage Collector available on OS4 ?

PostPosted: Wed Dec 05, 2018 11:01 am
by frederick
Well, unlike C++, Obj-C has no RAII/Scope bounded "facilities" to manage memory.
So without a "smart" compiler as Clang that supports ARC (automatic reference counting) and the adequate Obj-C runtime, it's quite difficult to fully avoid memory leaks.
POC (Portable object compiler) is actually a transpiler which turns Obj-C code into ANSI-C (thus very portable).

Few months (years ?) ago I recompiled POC together with the Boehm GC library under OS3 using StormGCC.
As there is a SAS/C makefile in the Boehm GC archive, it was totally doable.

The biggest challenge (to me at least) is that in the current state of the Boehm GC library "Amiga" means M68K , and basically PPC means Mac.
The code is mainly C but there are some part in inline assembly also. But putting my hands into PPC assembly is way above my actual knowledge. :-)

To make is short, having a running Boehm GC on OS4 would definitely be a great addition for people using those languages (C/Obj-C)