diff --git a/rtl/inc/heap.inc b/rtl/inc/heap.inc index 61249f8b3f..9b9d0122bd 100644 --- a/rtl/inc/heap.inc +++ b/rtl/inc/heap.inc @@ -16,11 +16,6 @@ {****************************************************************************} { Do not use standard memory manager } -{ Custom memory manager is Multi Threaded and does not require locking } -{ define HAS_MT_MEMORYMANAGER} - -{ Do not use standard memory manager } -{ Custom memory manager requires locking when threading is used } { define HAS_MEMORYMANAGER} { Try to find the best matching block in general freelist } @@ -34,10 +29,6 @@ (with 16 byte granularity) } { define DUMP_MEM_USAGE} -{$ifdef HAS_MT_MEMORYMANAGER} - {$define HAS_MEMORYMANAGER} -{$endif HAS_MT_MEMORYMANAGER} - {$ifdef DUMP_MEM_USAGE} {$define SHOW_MEM_USAGE} {$endif} @@ -76,11 +67,7 @@ const { Memory manager } const MemoryManager: TMemoryManager = ( -{$ifdef HAS_MT_MEMORYMANAGER} - NeedLock: false; -{$else HAS_MT_MEMORYMANAGER} - NeedLock: true; -{$endif HAS_MT_MEMORYMANAGER} + NeedLock: false; // Obsolete GetMem: @SysGetMem; FreeMem: @SysFreeMem; FreeMemSize: @SysFreeMemSize; diff --git a/rtl/inc/heaph.inc b/rtl/inc/heaph.inc index cdaf0cf550..4b79e04d6a 100644 --- a/rtl/inc/heaph.inc +++ b/rtl/inc/heaph.inc @@ -37,7 +37,7 @@ type PMemoryManager = ^TMemoryManager; TMemoryManager = record - NeedLock : boolean; + NeedLock : boolean; // Obsolete Getmem : Function(Size:ptruint):Pointer; Freemem : Function(p:pointer):ptruint; FreememSize : Function(p:pointer;Size:ptruint):ptruint; diff --git a/rtl/inc/system.inc b/rtl/inc/system.inc index 89e078b22e..9b3db31736 100644 --- a/rtl/inc/system.inc +++ b/rtl/inc/system.inc @@ -767,7 +767,7 @@ end; Procedure system_exit;forward; {$ifdef FPC_HAS_FEATURE_HEAP} -{$if not (defined(HAS_MEMORYMANAGER) or defined(HAS_MT_MEMORYMANAGER))} +{$ifndef HAS_MEMORYMANAGER} //not needed if independant memory manager Procedure FinalizeHeap;forward; {$endif HAS_MEMORYMANAGER} @@ -829,7 +829,7 @@ Begin {$endif} {$ifdef FPC_HAS_FEATURE_HEAP} -{$if not (defined(HAS_MEMORYMANAGER) or defined(HAS_MT_MEMORYMANAGER))} +{$ifndef HAS_MEMORYMANAGER} FinalizeHeap; {$endif HAS_MEMORYMANAGER} {$endif FPC_HAS_FEATURE_HEAP} diff --git a/rtl/wince/system.pp b/rtl/wince/system.pp index d53566e982..1869a9ad78 100644 --- a/rtl/wince/system.pp +++ b/rtl/wince/system.pp @@ -24,7 +24,7 @@ interface {$define WINCE_EXCEPTION_HANDLING} {$define DISABLE_NO_THREAD_MANAGER} {$define HAS_CMDLINE} -{$define HAS_MT_MEMORYMANAGER} // comment this line to switch from wincemm to fpcmm +{$define HAS_MEMORYMANAGER} // comment this line to switch from wincemm to fpcmm {$define HAS_WIDESTRINGMANAGER} { include system-independent routine headers } @@ -1585,7 +1585,7 @@ procedure InitWinCEWidestrings; end; -{$IFDEF HAS_MT_MEMORYMANAGER} +{$IFDEF HAS_MEMORYMANAGER} {**************************************************************************** Memory manager @@ -1652,7 +1652,7 @@ begin fillchar(Result,sizeof(Result),0); end; -{$ENDIF HAS_MT_MEMORYMANAGER} +{$ENDIF HAS_MEMORYMANAGER} {**************************************************************************** Error Message writing using messageboxes @@ -1800,10 +1800,10 @@ initialization if not IsLibrary then SysInstance:=GetModuleHandle(nil); MainInstance:=SysInstance; -{$IFNDEF HAS_MT_MEMORYMANAGER} +{$IFNDEF HAS_MEMORYMANAGER} { Setup Heap } InitHeap; -{$ENDIF HAS_MT_MEMORYMANAGER} +{$ENDIF HAS_MEMORYMANAGER} SysInitExceptions; if not IsLibrary then begin