Explorar o código

+ set the win16 local heap size in the executable

git-svn-id: trunk@31552 -
nickysn %!s(int64=10) %!d(string=hai) anos
pai
achega
4b80bc958c
Modificáronse 2 ficheiros con 8 adicións e 0 borrados
  1. 7 0
      compiler/parser.pas
  2. 1 0
      compiler/systems/t_win16.pas

+ 7 - 0
compiler/parser.pas

@@ -149,6 +149,13 @@ implementation
                    else
                    else
                      stacksize:=5120;
                      stacksize:=5120;
                  end;
                  end;
+               if heapsize=0 then
+                 begin
+                   if init_settings.x86memorymodel in x86_far_data_models then
+                     heapsize:=8192
+                   else
+                     heapsize:=4096;
+                 end;
              end;
              end;
 {$endif i8086}
 {$endif i8086}
          end;
          end;

+ 1 - 0
compiler/systems/t_win16.pas

@@ -141,6 +141,7 @@ begin
       LinkRes.Add('library '+MaybeQuoted(s));
       LinkRes.Add('library '+MaybeQuoted(s));
   end;
   end;
   LinkRes.Add('format windows');
   LinkRes.Add('format windows');
+  LinkRes.Add('option heapsize='+tostr(heapsize));
   if (cs_link_map in current_settings.globalswitches) then
   if (cs_link_map in current_settings.globalswitches) then
     LinkRes.Add('option map='+maybequoted(ChangeFileExt(current_module.exefilename,'.map')));
     LinkRes.Add('option map='+maybequoted(ChangeFileExt(current_module.exefilename,'.map')));
   LinkRes.Add('name ' + maybequoted(current_module.exefilename));
   LinkRes.Add('name ' + maybequoted(current_module.exefilename));