* gstacksize removed.
[scilab.git] / scilab / modules / core / help / en_US / configuration / stacksize.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="stacksize">
3     <refnamediv>
4         <refname>stacksize</refname>
5         <refpurpose>set scilab stack size</refpurpose>
6     </refnamediv>
7     <refsynopsisdiv>
8         <title>Calling Sequence</title>
9         <synopsis>stacksize(n)
10             stacksize('max')
11             stacksize('min')
12             sz = stacksize()
13         </synopsis>
14     </refsynopsisdiv>
15     <refsection>
16         <title>Arguments</title>
17         <variablelist>
18             <varlistentry>
19                 <term>n</term>
20                 <listitem>
21                     <para>an integer, the required stack size given in number of double precision words (8 bytes each)</para>
22                 </listitem>
23             </varlistentry>
24             <varlistentry>
25                 <term>sz</term>
26                 <listitem>
27                     <para>a 2-vector [total used]</para>
28                 </listitem>
29             </varlistentry>
30         </variablelist>
31     </refsection>
32     <refsection>
33         <title>Description</title>
34         <para>
35             Scilab stores "usual" variables in a stack <literal>stk</literal>.
36         </para>
37         <para>
38             <code>stacksize(n)</code> allows the user to increase or decrease the size of
39             this stack. The maximum allowed size depends on the amount of
40             free memory and swap space available at the time.
41         </para>
42         <para>
43             <code>stacksize('max')</code> allows the user to increase the size of
44             this stack to the maximum.
45         </para>
46         <para>
47             <code>stacksize('min')</code> allows the user to decrease the size of
48             this stack to the minimum.
49         </para>
50         <para>
51             This function with the <code>n</code> argument can now be used everywhere.
52         </para>
53         <para>
54             <code>sz = stacksize()</code> returns a 2-vector which contains  the current
55             total and used stack size.
56         </para>
57         <para>By default, the size of the stack is 10 000 000 (~76 Mb).</para>
58         <para>On 64 bit platforms, maximum size of the stack is limited to 268 435 454.</para>
59     </refsection>
60     <refsection>
61         <title>Examples</title>
62         <programlisting role="example"><![CDATA[
63 currentStackSize = stacksize();
64 disp("Maximum stacksize: " + string(currentStackSize(1)))
65 disp("Current usage: "+ string(currentStackSize(2)))
66
67  ]]></programlisting>
68     </refsection>
69     <refsection role="see also">
70         <title>See Also</title>
71         <simplelist type="inline">
72             <member>
73                 <link linkend="who">who</link>
74             </member>
75         </simplelist>
76     </refsection>
77 </refentry>