mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-08 01:08:07 +02:00
Start getmem calls with smaller memory chuncks for CPU16 like i8086
git-svn-id: trunk@36240 -
This commit is contained in:
parent
570f159e65
commit
c0fd038eaa
@ -9,6 +9,17 @@
|
||||
uses
|
||||
erroru;
|
||||
|
||||
{$ifdef CPU16}
|
||||
const
|
||||
StartSize = 16*1024;
|
||||
MaxSize = $10000;
|
||||
{$else}
|
||||
const
|
||||
StartSize = 1024*1024;
|
||||
MaxSize = 2000000000{$ifdef CPU64}*2000000000{$endif CPU64};
|
||||
{$endif}
|
||||
|
||||
|
||||
type
|
||||
matrix_element = array[1..1] of byte;
|
||||
big_matrix = array[1..1000000,1..610] of matrix_element;
|
||||
@ -28,12 +39,12 @@ begin
|
||||
ReturnNilIfGrowHeapFails:=true;
|
||||
domem(mem);
|
||||
done := false;
|
||||
size := 40000000;
|
||||
size := StartSize;
|
||||
repeat
|
||||
size := size+(size div 10);
|
||||
storage := size * sizeof(real);
|
||||
if storage>2000000000{$ifdef CPU64}*2000000000{$endif CPU64} then
|
||||
storage:=2000000000{$ifdef CPU64}*2000000000{$endif CPU64};
|
||||
if storage>MaxSize then
|
||||
storage:=MaxSize;
|
||||
writeln('size=',size,' (storage=',storage,')');
|
||||
getmem(l,storage);
|
||||
if (l=nil) then
|
||||
|
Loading…
Reference in New Issue
Block a user