[Scilab-users] 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
Mon Sep 28 12:01:13 CEST 2015
Hello all,
> Also, if you don't already know about it, stacksize is a handy Scilab
> function if you're working with large data arrays. "stacksize max"
> will
> either give you the biggest Scilab stack that can be had or crash
> your
> machine, depending on your version (it appears to work in the current
> version). "stacksize(nnn)" will set your stacksize to nnn, without
> crashing your machine (to my knowledge). "stacksize" will report the
> current stacksize.
As a reference, David posted a bug on that
http://bugzilla.scilab.org/show_bug.cgi?id=14176 and he targets Scilab
6.
So I have a question on your needs for Scilab 6. There is currently no
more stacksize as all the system's memory is available. To protect
users, I suggested to re-introduce `stacksize` with a changed behavior
:
* M=stacksize(N) : will set N * sizeof(double) bytes available on the
Scilab datatypes raw memory
will return M the previous sett'ed value
* stacksize('max') : will disable any memory restriction
## Why re-introducing `stacksize` ?
On my Linux system (with 8Go of RAM and some applications started),
allocating all my memory (like with `zeros(2**30,2**3)`) slow my
computer down and succeed after a lot of time. Reducing the memory
available to Scilab using `stacksize` will help user discover algorithm
or memory issues more rapidly and without swapping most of the other
applications *by default* .
My point is not to limit the available memory issue but ease language
usage for new-comers by protect them against typo or mis-design
algorithms.
Awaiting your opinion,
--
Clément <david> David
More information about the users
mailing list