Is Boehm Garbage Collector available on OS4 ?

This forum is for general developer support questions.

Is Boehm Garbage Collector available on OS4 ?

Postby frederick » Mon Dec 03, 2018 3:17 pm

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
frederick
 
Posts: 5
Joined: Mon Mar 19, 2018 5:50 pm

Re: Is Boehm Garbage Collector available on OS4 ?

Postby tonyw » Tue Dec 04, 2018 12:06 am

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

What is it used for?
cheers
tony
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 1332
Joined: Wed Mar 09, 2011 2:36 pm
Location: Sydney, Australia

Re: Is Boehm Garbage Collector available on OS4 ?

Postby frederick » Tue Dec 04, 2018 10:29 am

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
frederick
 
Posts: 5
Joined: Mon Mar 19, 2018 5:50 pm

Re: Is Boehm Garbage Collector available on OS4 ?

Postby tonyw » Wed Dec 05, 2018 12:12 am

So, it's a replacement for gcc++'s GC?
cheers
tony
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 1332
Joined: Wed Mar 09, 2011 2:36 pm
Location: Sydney, Australia

Re: Is Boehm Garbage Collector available on OS4 ?

Postby frederick » Wed Dec 05, 2018 11:01 am

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)
User avatar
frederick
 
Posts: 5
Joined: Mon Mar 19, 2018 5:50 pm


Return to General Developer Support

Who is online

Users browsing this forum: No registered users and 4 guests