Short answer : it requires a lot of customization and can be very difficult if you are not an experienced D. developer.
The list of problems :
Memory management is not a big problem. In real-time applications, you never want to allocate memory in the main loop. Having pre-allocated memory pools for all master data is pretty much de facto standard for such applications. In this sense, D is no different - you still call C malloc directly to get a bunch for your pools, and this memory will not be managed by GC, it wonβt even know about it.
However, some language features and large parts of Phobos do use GC automatically. For example, you cannot merge fragments without any form of automatic control. And Phobos simply did not have a strong policy on this for quite some time.
The few language-related releases alone will not be a problem, since most of the memory used is managed through pools anyway. However, there is a problem with the killer for real-time software in warehouse D: the default garbage collector D is the stop world. Even if there is almost no garbage, your entire program will fall into a latent spike when you start the collection cycle, since all threads are blocked.
What can be done:
1) Use GC.disable(); to disable data collection cycles. This will solve the stop-world problem, but now your program will start a memory leak in some cases, since GC-based allocations still work.
2) Reset hidden GC allocations. There was a transfer request for the -vgc switch, which I cannot find right now, but in its absence you can compile your own version of druntime, which prints a backtrace when you call gc_malloc() . You can run this as part of an automatic test suite.
3) Avoid Phobos completely and use something like https://bitbucket.org/timosi/minlibd as an alternative.
Doing all of this should be sufficient to orientate the soft real-time requirements of the game dev, but, as you can see, this is far from simple and requires getting out of the distribution D.
Future Alternative:
Once Leandro Lucarella sends its parallel garbage collector to D2 (which is planned but not planned), the situation will become much easier. A small amount of managed GC-compatible memory + parallel implementation will satisfy the requirements in real time even without disconnecting the GC. Even Phobos can be used after it is devoid of the most annoying distributions. But I do not think that this will happen in the near future.
But what about hard real time?
Better not to try. But this is another story to tell.