瀏覽代碼

* Removed HAS_MT_MEMORYMANAGER define, since it is obsolete now.

git-svn-id: trunk@9556 -
yury 17 年之前
父節點
當前提交
e00bacdcef
共有 4 個文件被更改,包括 9 次插入22 次删除
  1. 1 14
      rtl/inc/heap.inc
  2. 1 1
      rtl/inc/heaph.inc
  3. 2 2
      rtl/inc/system.inc
  4. 5 5
      rtl/wince/system.pp

+ 1 - 14
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;

+ 1 - 1
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;

+ 2 - 2
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}

+ 5 - 5
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