[scilab-Users] memory management

Jonathan Blanchard BlanchardJ at ieee.org
Sun Jun 19 19:08:26 CEST 2011


On Sun, Jun 19, 2011 at 1:53 PM, Process Control
<computerprocesscontrol at gmail.com> wrote:
> Hi,
>
> I ran the follwing commands:
>
> stacksize("max")
> tic();rand(10000,10000);toc()
>
> It works fine and the stacksize after running these commands is:
>
> 2.684D+08    8179
>
> But in the process monitor on gnome, scilab-bin is occupying 1.6 GiB. So,
> the only way to free this RAM is to restart scilab. Please, could you
> explain what is going on and how to free the memory without restarting
> scilab.
>
> thank you
>

Well, by calling stacksize("max") Scilab will try to increase it's
stack to the maximum possible which it did in this case. The memory
usage displayed by gnome monitor is the process virtual memory usage
which will never shrink even if the memory is freed. The amount of
physical memory used is the resident set size but I'm not sure how to
check that on a Linux system. To free physical memory after it's not
needed you can reduce the Scilab stack with the same command, however
it cannot be reduced smaller than what is currently necessary to store
all the active variables in Scilab. The clear() command can be used to
remove unwanted variables and then the stack size can be reduced.

Jonathan Blanchard



More information about the users mailing list