|Posted by Rainer Schuetze|
in reply to Fausto
Posted in reply to Fausto
On 04/10/2022 23:26, Fausto wrote:
> Hello all,
> I have a huge memory usage when I use visual D (in VS 2200) and this of course is slowing down everything.
> DMD Semantic Server uses up to 25-29 GB of RAM and even if Visual Studio is closed, two DMD processes are still running in the background.
> How is it possible?
Just the other day I noticed that the updated dmd compiler version that powers dmdserver introduced some global arrays to keep documentation out of the syntax tree. These reference the source file content, so they never get garbage collected and can cause rather fast increase of memory usage.
I have a fix for that. There are a few other issues I want to resolve, but I hope to have a new release this weekend.
> I am using the latest Visual D version and I didn't notice that the parameter to restart DMD server if it is using more than X MB of memory. The default setting is 0 (so never) and I think this is the main reason for this behaviour.
Unfortunately, this option is unlikely to help, as it doesn't kill the process, but frees all modules kept in memory. This won't affect the global arrays mentioned above.
> But anyway, is it possible to use almost 30GB of memory?