Is Boehm Garbage Collector available on OS4 ?

This forum is for general developer support questions.
Post Reply
User avatar
frederick
Posts: 7
Joined: Mon Mar 19, 2018 4:50 pm

Is Boehm Garbage Collector available on OS4 ?

Post 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 !
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 1479
Joined: Wed Mar 09, 2011 1:36 pm
Location: Sydney, Australia

Re: Is Boehm Garbage Collector available on OS4 ?

Post by tonyw »

No. (Unless you can find a private version on OS4Depot or Aminet).

What is it used for?
cheers
tony
User avatar
frederick
Posts: 7
Joined: Mon Mar 19, 2018 4:50 pm

Re: Is Boehm Garbage Collector available on OS4 ?

Post 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. :-)
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 1479
Joined: Wed Mar 09, 2011 1:36 pm
Location: Sydney, Australia

Re: Is Boehm Garbage Collector available on OS4 ?

Post by tonyw »

So, it's a replacement for gcc++'s GC?
cheers
tony
User avatar
frederick
Posts: 7
Joined: Mon Mar 19, 2018 4:50 pm

Re: Is Boehm Garbage Collector available on OS4 ?

Post 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)
Post Reply