News for hackers. Stuff that matters.
Re:RoboVM: Native iOS apps in Java by heavenlyhash on Sunday April 13, 2014 @03:01PM (#7582449)
Niklas (the RoboVM lead dev) talked briefly about how the GC is used on the list here: https://groups.google.com/d/msg/robovm/etAxWMYvRTU/huXKmPA-J...

If I understand correctly, when used in "precise" mode, the Boehm GC is capable of compacting. Mono north of version 2.8 also claims to be heap compacting by virtue of Boehm in precise mode.

Re:RoboVM: Native iOS apps in Java by ntherning on Sunday April 13, 2014 @05:22PM (#7583109)
I'm afraid that you are mistaken about the capabilities of the Boehm GC when it comes to compacting. It doesn't compact so heap fragmentation is a possibility with RoboVM. Mono 2.8 introduced SGen [0] which is a totally separate GC developed by the Mono project. It is a compacting GC and is now the default IIUC.

/Niklas

[0] http://www.mono-project.com/Working_With_SGen

Re:RoboVM: Native iOS apps in Java by heavenlyhash on Sunday April 13, 2014 @07:45PM (#7583688)
Ah, I stand corrected.

(I had drawn my impression of Mono from https://en.wikipedia.org/wiki/Boehm_garbage_collector#Uses_a... 's current statement: "The Boehm GC is used by many projects that are implemented in C or C++, as well as by runtime environments for a number of other languages, including [...], the Mono implementation of the Microsoft .NET platform (also using precise compacting GC since version 2.8)"... which evidentially is referring to "also" a different GC entirely, rather than a mode as I had thought.)

Do you know of any good resources that explain more about the precise vs conservative scanning modes of Boehm?

I thought I recalled some references to a precise mode available via a "GC_MALLOC_ATOMIC" function in Boehm which would understand all of the contained data to be not-pointers and thus enable smarter handling, but perhaps that's a necessary-but-not-sufficient thing on the road to heap compacting. I'm hitting a lot of dead links looking for more information sadly; hpl.hp.com seems to have suffered a reorganization lately :(

EDIT: http://hboehm.info/gc/ appears to be the living mirror of http://www.hpl.hp.com/personal/Hans_Boehm/gc/ and contains useful documentation and FAQs.