Browse Source

* fixed for 64 bit CPUs

git-svn-id: trunk@4963 -
florian 19 years ago
parent
commit
7c915938d9
1 changed files with 4 additions and 4 deletions
  1. 4 4
      tests/webtbs/tw2494.pp

+ 4 - 4
tests/webtbs/tw2494.pp

@@ -15,7 +15,7 @@ type
 
 
 var p:pointer;
 var p:pointer;
   l : ^longarray;
   l : ^longarray;
-  size, storage : cardinal;
+  size, storage : ptruint;
   i,j:longint;
   i,j:longint;
   done:boolean;
   done:boolean;
   mem : sizeint;
   mem : sizeint;
@@ -25,10 +25,10 @@ begin
   done := false;
   done := false;
   size := 40000000;
   size := 40000000;
   repeat
   repeat
-    size := round(size * 1.1);
+    size := size+(size div 10);
     storage := size * sizeof(real);
     storage := size * sizeof(real);
-    if storage>2000000000 then
-      storage:=2000000000;
+    if storage>2000000000{$ifdef CPU64}*2000000000{$endif CPU64} then
+      storage:=2000000000{$ifdef CPU64}*2000000000{$endif CPU64};
     writeln('size=',size,' (storage=',storage,')');
     writeln('size=',size,' (storage=',storage,')');
     getmem(l,storage);
     getmem(l,storage);
     if (l=nil) then
     if (l=nil) then