On Sunday, 19 May 2019 at 23:54:27 UTC, Anonymouse wrote:
What makes it decide to collect? What triggers it?

You can try setting heapSizeFactor option to something lower than 2 to increase collection frequency:
https://github.com/dlang/druntime/blob/47b03c14a1097d28afcf22f645628ba4046377bd/src/core/gc/config.d#L26
https://dlang.org/spec/garbage.html#gc_config

dmd appears to respect DRT_GCOPT environment variable.

The logic behind the decision to collect, I'm afraid, is not described anywhere but the code itself (https://github.com/dlang/druntime/blob/47b03c14a1097d28afcf22f645628ba4046377bd/src/gc/impl/conservative/gc.d#L1690)

Reply via email to