瀏覽代碼

Use FPC_NO_DEFAULT_HEAP to turn out RelocateHeap or MemoryManager.InitThread functions, used for msdos OS

git-svn-id: trunk@33679 -
pierre 9 年之前
父節點
當前提交
cbb29a7e5d
共有 2 個文件被更改,包括 8 次插入1 次删除
  1. 6 1
      rtl/inc/thread.inc
  2. 2 0
      rtl/inc/threadvr.inc

+ 6 - 1
rtl/inc/thread.inc

@@ -39,11 +39,14 @@ Var
         SysInitFPU;
 {$endif}
 {$ifndef HAS_MEMORYMANAGER}
+{$ifndef FPC_NO_DEFAULT_HEAP}
         { initialize this thread's heap }
         InitHeapThread;
-{$endif HAS_MEMORYMANAGER}
+{$endif ndef FPC_NO_DEFAULT_HEAP}
+{$else HAS_MEMORYMANAGER}
         if MemoryManager.InitThread <> nil then
           MemoryManager.InitThread();
+{$endif HAS_MEMORYMANAGER}
 {$ifdef FPC_HAS_FEATURE_WIDESTRINGS}
         if assigned(widestringmanager.ThreadInitProc) then
           widestringmanager.ThreadInitProc;
@@ -76,7 +79,9 @@ Var
           widestringmanager.ThreadFiniProc;
 {$endif FPC_HAS_FEATURE_WIDESTRINGS}
 {$ifndef HAS_MEMORYMANAGER}
+{$ifndef FPC_NO_DEFAULT_HEAP}
         FinalizeHeap;
+{$endif ndef FPC_NO_DEFAULT_HEAP}
 {$endif HAS_MEMORYMANAGER}
         if MemoryManager.DoneThread <> nil then
           MemoryManager.DoneThread();

+ 2 - 0
rtl/inc/threadvr.inc

@@ -113,7 +113,9 @@ begin
    fpc_threadvar_relocate_proc:=RelocProc;
 {$ifdef FPC_HAS_FEATURE_HEAP}
 {$ifndef HAS_MEMORYMANAGER}
+{$ifndef FPC_NO_DEFAULT_HEAP}
    RelocateHeap;
+{$endif ndef FPC_NO_DEFAULT_HEAP}
 {$endif HAS_MEMORYMANAGER}
 {$endif}
 end;