Teun M.
Teun M.

Reputation: 184

Rascal MPL how to increase heap size?

I just stumbled upon this old post that mentions Java heap space and how to change its parameters in Eclipse (in the eclipse.ini file). How do I do set these in the new VSCode environment?

Upvotes: 1

Views: 72

Answers (1)

Jurgen Vinju
Jurgen Vinju

Reputation: 6696

The Eclipse environment is quite different from the VScode environment. Everything runs in a single JVM there, and so it was difficult for plugin writers to programmatically increase the heap size. This led to writing manual pages on the topic.

In VScode we have a JVM for every Rascal process:

  • for every terminal REPL there is one JVM
  • for the Rascal LSP server there is one JVM
  • for the generic DSL-parametrized LSP server there is one JVM
  • there is one JVM for every deployed DSL server written in Rascal

And the extension code starts these JVMs, so we can control how much memory they receive. The latest release does this by assessing the total available memory on your machine and allocating a sumptuous amount for every process.

And so there is no configuration option for the user anymore, as we had to add for the Eclipse situation.

Upvotes: 1

Related Questions