stackinfo.c File Reference

#include "stackinfo.h"
#include "stack-def.h"

Include dependency graph for stackinfo.c:

Go to the source code of this file.

Defines

#define MAXLONG   LONG_MAX
#define LONG_MAX   2147483647L

Functions

integer C2F() getstackinfo (integer *total, integer *used)
integer C2F() getgstackinfo (integer *total, integer *used)
integer C2F() getvariablesinfo (integer *total, integer *used)
integer C2F() getgvariablesinfo (integer *total, integer *used)
BOOL is_a_valid_size_for_scilab_stack (int sizestack)
unsigned long get_max_memory_for_scilab_stack (void)


Define Documentation

#define LONG_MAX   2147483647L

Definition at line 22 of file stackinfo.c.

Referenced by convci(), and mkintqcon().

#define MAXLONG   LONG_MAX

Definition at line 18 of file stackinfo.c.

Referenced by get_max_memory_for_scilab_stack().


Function Documentation

unsigned long get_max_memory_for_scilab_stack ( void   ) 

Definition at line 69 of file stackinfo.c.

References MAXLONG.

Referenced by C2F().

00070 {
00071         return MAXLONG/sizeof(double);
00072 }

Here is the caller graph for this function:

integer C2F() getgstackinfo ( integer total,
integer used 
)

Definition at line 36 of file stackinfo.c.

References C2F, and used.

Referenced by C2F(), and NoRhs().

00037 {
00038         *used = C2F(vstk).lstk[C2F(vstk).gtop] - C2F(vstk).lstk[C2F(vstk).isiz + 1] + 1;
00039         *total = C2F(vstk).lstk[C2F(vstk).gbot - 1] - C2F(vstk).lstk[C2F(vstk).isiz + 1] ;
00040         return(0);
00041 }

Here is the caller graph for this function:

integer C2F() getgvariablesinfo ( integer total,
integer used 
)

Definition at line 50 of file stackinfo.c.

References C2F, and used.

Referenced by getGlobalSizefromId(), NoRhs(), and SetVariablesStructs().

00051 {
00052         *used = C2F(vstk).gtop - C2F(vstk).isiz - 1;
00053         *total = 10000 - C2F(vstk).isiz - 1;
00054         return 0;
00055 }

Here is the caller graph for this function:

integer C2F() getstackinfo ( integer total,
integer used 
)

Definition at line 29 of file stackinfo.c.

References C2F, and used.

Referenced by C2F(), and NoRhs().

00030 {
00031         *used = C2F(vstk).lstk[C2F(vstk).isiz - 1] - C2F(vstk).lstk[C2F(vstk).bot - 1] + 1;
00032         *total = C2F(vstk).lstk[C2F(vstk).isiz - 1] - C2F(vstk).lstk[0];
00033         return(0);
00034 }

Here is the caller graph for this function:

integer C2F() getvariablesinfo ( integer total,
integer used 
)

Definition at line 43 of file stackinfo.c.

References C2F, and used.

Referenced by getLocalSizefromId(), NoRhs(), and SetVariablesStructs().

00044 {
00045         *used = C2F(vstk).isiz - C2F(vstk).bot ;
00046         *total = C2F(vstk).isiz - 1;
00047         return 0;
00048 }

Here is the caller graph for this function:

BOOL is_a_valid_size_for_scilab_stack ( int  sizestack  ) 

Definition at line 57 of file stackinfo.c.

References FALSE, long, and TRUE.

Referenced by C2F().

00058 {
00059         BOOL bOK=TRUE;
00060         double dsize = ((double) sizeof(double)) * (sizestack);
00061         unsigned long ulsize = ((unsigned long)sizeof(double)) * (sizestack);
00062         if ( dsize != (double) ulsize)
00063         {
00064                 bOK=FALSE;
00065         }
00066         return bOK;
00067 }

Here is the caller graph for this function:


Generated on Sun Mar 4 15:17:25 2007 for Scilab [trunk] by  doxygen 1.5.1