> From: "Weber, Dr Charles" <Weberc{([at]})nowhere.xy
> To: "'Treutwein; Bernhard'"
> <Bernhard.Treutwein{([at]})nowhere.xy
> Subject: RE: memory limit?
> Date: Wed, 27 Jun 2001 14:32:42 -0400
> MODULE TestMatrix;
> IMPORT StdLog;
> PROCEDURE MultMat*;
> VAR a: ARRAY 507 OF ARRAY 507 OF REAL;
> b,c: ARRAY 507 OF REAL;
> i,j: INTEGER;
> BEGIN
> ...............
> END MultMat;
> END TestMatrix.
>
oops, in this way you are definitely allocating space
on the stack (local variable).
Try:
TYPE
Vector = POINTER TO ARRAY OF REAL;
Matrix = POINTER TO ARRAY Vector;
...
VAR
dim : INTEGER;
a : Matrix;
b, c : Vector;
...
(* read dim *)
NEW(a, dim, dim);
NEW(b, dim);
NEW(c, dim);
...
This way, the memory is definitely allocated on the heap.
I remember rumors that there was some heap memory
limit under 1.3.x, but that should be gone with 1.4beta.
BTW: do you need 64 bit reals, if not, use SHORTREAL
regards
Received on Thu Jun 28 2001 - 08:04:25 UTC