|
@@ -473,6 +473,7 @@ var
|
|
|
BaseFilename: TPathStr;
|
|
|
RsrcStr : string;
|
|
|
OutName: TPathStr;
|
|
|
+ StackSizeKB: cardinal;
|
|
|
begin
|
|
|
if not(cs_link_nolink in current_settings.globalswitches) then
|
|
|
Message1(exec_i_linking,current_module.exefilename);
|
|
@@ -513,6 +514,12 @@ begin
|
|
|
{ Is this really required? Not anymore according to my EMX docs }
|
|
|
Replace(cmdstr,'$HEAPMB',tostr((1048575) shr 20));
|
|
|
{Size of the stack when an EMX program runs in OS/2.}
|
|
|
+ StackSizeKB := (StackSize + 1023) shr 10;
|
|
|
+ (* Ensure a value which might work and is accepted by EMXBIND *)
|
|
|
+ if StackSizeKB < 64 then
|
|
|
+ StackSizeKB := 64
|
|
|
+ else if StackSizeKB > (512 shl 10) then
|
|
|
+ StackSizeKB := 512 shl 10;
|
|
|
Replace(cmdstr,'$STACKKB',tostr((stacksize+1023) shr 10));
|
|
|
{When an EMX program runs in DOS, the heap and stack share the
|
|
|
same memory pool. The heap grows upwards, the stack grows downwards.}
|