[proFit-list] Global variable size limit exceeded

Peter Amrhein peter at quansoft.com
Thu Jan 10 20:05:13 CST 2008


Dear Joseph

On PowerPC machines there is a limitation of 32 kB for the combined  
size of code and global variables, and similar for local variables.
On Intel machines this limit is much larger, i.e. it is at 8 MB. (at  
least since pro Fit 6.1.5)
These limits are given by the way we built our compiler, and they  
can't be increased without major changes.

Your code + global variables' size is somewhat larger than 38 kB, i.e.  
it exceeds the 32 kB limit on PowerPC machines.

If you need to compile and run your function on a PowerPC machine,  
then we see the following options to get around the limitation:
a) You could reduce the size of the global variables, if your function  
allows to move part of the variables into local functions or procedures.
b) You could write the values that you would store in these variables  
into a data window and read them back from there when needed.
c) You find an algorithm that needs not all variables to be available  
in the function at the same time, if it is e.g. possible to do a file  
by file processing.

We hope these ideas give you some help.

Best regards,

Your Quantum Soft Team





On 10.01.2008, at 20:04, Joseph Walrath wrote:

> The following code, when compiled, lead to this message: "The total  
> size of global variables exceeds its limit."
> It's just a bunch of arrays with 50 elements each.  Any suggestions?
>
> program ParseSymmetryTables;
> const
> 	NumFiles = 50;
> var
> 	i, FileCount: integer;
> 	v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15 :  
> array[1..NumFiles] of real;
> 	v16,v17,v18,v19,v20,v21,v22,v23,v24,v25,v26,v27,v28,v29,v30: array  
> [1..NumFiles] of real;
> 	DataWindowHandle: array[1..NumFiles] of integer;
> 	vLabel, FileNames: array [1..NumFiles] of string;
> 	OutputFilename, OutputPath: string;
>
> procedure ReadAFile;
> var
> 	i: integer;
> 	real1, real2: real;
> begin
> 	OpenFile(file '?' , type dataType);
> end;
>
> begin
> 		FileCount := 0;
> 		ReadAFile;
> end;
>
> Thanks much.
>
> -- 
> Joseph Walrath, MD
> Departments of Ophthalmology
> Columbia University, Edward S. Harkness Eye Institute
> St. Vincent's Catholic Medical Center
> _______________________________________________
> proFit-list mailing list
> proFit-list at quantum-soft.com
> http://quantum-soft.com/mailman/listinfo/profit-list_quantum-soft.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://quantum-soft.com/pipermail/profit-list_quantum-soft.com/attachments/20080110/91d76b8a/attachment.html 


More information about the proFit-list mailing list