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

git-svn-id: trunk@33679 -
This commit is contained in:
pierre 2016-05-11 14:34:55 +00:00
parent effa0154c5
commit cbb29a7e5d
2 changed files with 8 additions and 1 deletions

View File

@ -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();

View File

@ -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;