* limit the heapsize to 65520 bytes on win16 (the $M directive in win16 only

sets the size of the "local heap", which is limited to a single segment. The
  actual heap in the large memory model is the "global heap", which doesn't have
  a set limit, but grows with the memory allocated)

git-svn-id: trunk@42660 -
This commit is contained in:
nickysn 2019-08-12 14:24:01 +00:00
parent ae953214ee
commit 31431d99ab

View File

@ -855,7 +855,12 @@ unit scandir;
maxheapsize_limit: longint;
begin
{$if defined(i8086)}
if current_settings.x86memorymodel in x86_far_data_models then
if target_info.system=system_i8086_win16 then
begin
heapsize_limit:=65520;
maxheapsize_limit:=65520;
end
else if current_settings.x86memorymodel in x86_far_data_models then
begin
heapsize_limit:=655360;
maxheapsize_limit:=655360;