Browse Source

+ set the win16 local heap size in the executable

git-svn-id: trunk@31552 -
nickysn 10 years ago
parent
commit
4b80bc958c
2 changed files with 8 additions and 0 deletions
  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
                      stacksize:=5120;
                  end;
+               if heapsize=0 then
+                 begin
+                   if init_settings.x86memorymodel in x86_far_data_models then
+                     heapsize:=8192
+                   else
+                     heapsize:=4096;
+                 end;
              end;
 {$endif i8086}
          end;

+ 1 - 0
compiler/systems/t_win16.pas

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