Browse Source

* 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 years ago
parent
commit
d00c67f9d3
2 changed files with 12 additions and 0 deletions
  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}
 {$DEFINE NOEXESUFFIX}
 {$endif}
 {$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
 const
   exedir : string = '';
   exedir : string = '';
 
 

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

@@ -22,6 +22,12 @@ uses dos;
 {$DEFINE NOEXESUFFIX}
 {$DEFINE NOEXESUFFIX}
 {$endif}
 {$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;
 procedure TestInfo;
 var
 var
   dt    : DateTime;
   dt    : DateTime;