Stephan Schiffels:

2.) Is there a way to "pause" the GC collection for the parallel part of my program, deliberately accepting higher memory usage?

There are GC.disable and GC.enable.


3.) Most of the memory is used in one huge array, perhaps I should simply use malloc and free for that particular array to avoid the GC from running so often.

This is sometimes acceptable. For some usages there is also Array in Phobos.


I am a bit surprised that there is no command line option for dmd to control GC maximum heap size.

Adding such option could be a good idea.


Who determines how often the GC is run?

The D GC is run when you allocate memory. If you don't allocate, it's run only at program start to initialize it.

Bye,
bearophile

Reply via email to