Impact of 64bits vs 32bits when using non precise GC.

As ARM release its intention to go 64bits, we can be pretty much sure that almost every device will be 64bits soon, except the one on which it is unrealistic to run a garbage collector.

A garbage collector can be precise like in Java, or not, like D’s GC or Boehm’s GC for C++. It means that theses GC don’t know what it a pointer and what isn’t. Non precise GC cannot move data to compact the heap, and are also prone to false positive. On a theoretical perspective, switching from 32 bits to 64 bits should improve things, but what it is in practice ?

Continue reading

Interfacing D with C++ : start new thread

Interfacing D with C++ is sometime tricky. In this scenario, I will show how to start a thread from C++ that execute C++ code, but in a valid D environment, so that C++ code can interact with D code safely.

This work as been done to port SFML2 to D2 language. But the technique is useful for anybody who want to start safely thread in a environment with code in both C++ and D.

Continue reading