Browse Source

* limited storage to 2e9 so it causes no wrap around on big machines

git-svn-id: trunk@819 -
florian 20 years ago
parent
commit
d1233afc48
1 changed files with 3 additions and 1 deletions
  1. 3 1
      tests/webtbs/tw2494.pp

+ 3 - 1
tests/webtbs/tw2494.pp

@@ -15,7 +15,7 @@ type
 
 var p:pointer;
   l : ^longarray;
-  size, storage : longint;
+  size, storage : cardinal;
   i,j:longint;
   done:boolean;
   mem : sizeint;
@@ -27,6 +27,8 @@ begin
   repeat
     size := round(size * 1.1);
     storage := size * sizeof(real);
+    if storage>2000000000 then
+      storage:=2000000000;
     writeln('size=',size,' (storage=',storage,')');
     getmem(l,storage);
     if (l=nil) then