Bläddra i källkod

* 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 -

nickysn 6 år sedan
förälder
incheckning
31431d99ab
1 ändrade filer med 6 tillägg och 1 borttagningar
  1. 6 1
      compiler/scandir.pas

+ 6 - 1
compiler/scandir.pas

@@ -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;