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

Samuel Gougeon sgougeon at free.fr
Wed Sep 30 16:04:43 CEST 2015


Hello,

> .../...
> The only way is to a implement a dedicated memory manager which 
> allocates a big memory buffer at startup, and manages all the memory 
> allocations in it....exactly what Scilab 5 does. 

So, my questions are:
* can't the same be implemented in Scilab 6?
* If yes: is there a way to implement it in such a way that sharing 
between global and local+intermediate variables/memory would be set 
dynamically, in a transparent way for the user that would not have to 
specify fixed amounts for each kind of variables?
* How the "default" buffer is initially sized in Scilab 5? Does it take 
into account the available memory at the time of launching the Scilab 
session, such as it could be different from a Scilab session to the 
other, particularly when several concurrent Scilab sessions are 
simultaneously run on the same computer? How could it be managed in 
Scilab 6,  while the former Scilab memory limit that became quite 
smaller than common available RAM does no longer hold?

> By the way, the goal of tuning the Java heap size is to optimize the 
> time production servers spend doing garbage collection. I don't think 
> we have this problem in Scilab.

Which problem are you referring to?
Knowing almost nothing about JVM and memory management by Java, i am 
rather unable to understand the meaning of your answer wrt my initial 
question about tuning the size of the java heap from Scilab. In a 
practical way, what can be noticed is that when using a lot of graphics 
in Scilab -- like for image processing --, some java exceptions can be 
avoided by increasing the size of the java heap. For practical usage, my 
remaining questions are:
* Is this setting a memory reservation?.. in such a way that increasing 
the java heap max size makes this memory unavailable for other processes 
external to Scilab, or even unavailable for other Scilab sessions 
running on the same computer?
* Does each Scilab session have its own java heap, or is the java heap 
shared? In the first case, including its setting through setmemory() of 
a session could be meaningful.

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

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




More information about the users mailing list