I think this happened after a recent java update.
For some reason MATLAB allocates a few Gb of memory every time I issue any command (even if the command produces an error and doesn't run) in the command window.
Commands that have been observed to allocate a few Gb of memory:
(yes with the cap letter, producing an error, but still allocating a few Gb of RAM)
Each of those results in a few Gb step of memory allocation in the windows system monitor.