[Scilab-users] setmemory() <= Re: Reintroducing stacksize on Scilab 6 ? was (Re: multiple element by element between large matrix and vector)

Clément David clement.david at scilab-enterprises.com
Thu Oct 1 10:34:35 CEST 2015


Le mercredi 30 septembre 2015 à 16:04 +0200, Samuel Gougeon a écrit :

> The meaning of my first post was that, from a user point of view, 
> knowing that the amount of memory involved in a Scilab session is of 
> "Scilab global kind" or of "Scilab intermediate kind" or of "java
> kind"  
> or of "TCL kind" (for so-called TCL interpreters) is of no
> importance. 
> The only thing that really matters is that my calculations and
> graphics 
> work within a specified total amount of memory. In an ideal world,
> even 
> the size of the java heap should be dynamically set as a part of the 
> total amount of memory set for the Scilab session. It might not be 
> possible, but it was the idea of my question/discussion.
> 
> Samuel

I think I was not clear enough. For me if you want to limit the
allocated memory for the whole process, you have to use some OS
specific features for that (ulimit or cgroups on Linux for exemple). My
point is just to avoid swapping and slowing down the whole computer on
Scilab beginner mistake.

In fact, it seems to be possible (at least on Windows using "Job
Objects" and Linux using "Cgroups") but out of scope for me.

> PS: By the way, in Scilab 5, are the TCL variables -- that are 
> "persistent" -- stored in the global area, or anywhere else?

Anywhere else (in the TCL allocated space) ! Each gateway can allocate
any data without being managed by Scilab. The stack usually only
contains an handle (an mlist containing a single pointer) used to
access the data.

--
Clément



More information about the users mailing list