瀏覽代碼

* limit the heap to 16kb in the i8086 far data memory models for the dos unit
tests that execute a child process. Otherwise, by default, all DOS memory is
reserved in these memory models, there's no DOS memory left for the child
process and exec() fails.

git-svn-id: trunk@28061 -

nickysn 11 年之前
父節點
當前提交
d00c67f9d3
共有 2 個文件被更改,包括 12 次插入0 次删除
  1. 6 0
      tests/test/units/dos/tdos.pp
  2. 6 0
      tests/test/units/dos/tidos.pp

+ 6 - 0
tests/test/units/dos/tdos.pp

@@ -21,6 +21,12 @@ uses dos;
 {$DEFINE NOEXESUFFIX}
 {$endif}
 
+{$ifdef msdos}
+  {$if defined(FPC_MM_COMPACT) or defined(FPC_MM_LARGE) or defined(FPC_MM_HUGE)}
+    {$M 16384,0,16384}  { 16k stack, up to 16k heap }
+  {$endif}
+{$endif}
+
 const
   exedir : string = '';
 

+ 6 - 0
tests/test/units/dos/tidos.pp

@@ -22,6 +22,12 @@ uses dos;
 {$DEFINE NOEXESUFFIX}
 {$endif}
 
+{$ifdef msdos}
+  {$if defined(FPC_MM_COMPACT) or defined(FPC_MM_LARGE) or defined(FPC_MM_HUGE)}
+    {$M 16384,0,16384}  { 16k stack, up to 16k heap }
+  {$endif}
+{$endif}
+
 procedure TestInfo;
 var
   dt    : DateTime;