* Removed HAS_MT_MEMORYMANAGER define, since it is obsolete now.

git-svn-id: trunk@9556 -
This commit is contained in:
yury 2007-12-28 11:30:46 +00:00
parent 93e62a3c0d
commit e00bacdcef
4 changed files with 9 additions and 22 deletions

View File

@ -16,11 +16,6 @@
{****************************************************************************} {****************************************************************************}
{ Do not use standard memory manager } { 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} { define HAS_MEMORYMANAGER}
{ Try to find the best matching block in general freelist } { Try to find the best matching block in general freelist }
@ -34,10 +29,6 @@
(with 16 byte granularity) } (with 16 byte granularity) }
{ define DUMP_MEM_USAGE} { define DUMP_MEM_USAGE}
{$ifdef HAS_MT_MEMORYMANAGER}
{$define HAS_MEMORYMANAGER}
{$endif HAS_MT_MEMORYMANAGER}
{$ifdef DUMP_MEM_USAGE} {$ifdef DUMP_MEM_USAGE}
{$define SHOW_MEM_USAGE} {$define SHOW_MEM_USAGE}
{$endif} {$endif}
@ -76,11 +67,7 @@ const
{ Memory manager } { Memory manager }
const const
MemoryManager: TMemoryManager = ( MemoryManager: TMemoryManager = (
{$ifdef HAS_MT_MEMORYMANAGER} NeedLock: false; // Obsolete
NeedLock: false;
{$else HAS_MT_MEMORYMANAGER}
NeedLock: true;
{$endif HAS_MT_MEMORYMANAGER}
GetMem: @SysGetMem; GetMem: @SysGetMem;
FreeMem: @SysFreeMem; FreeMem: @SysFreeMem;
FreeMemSize: @SysFreeMemSize; FreeMemSize: @SysFreeMemSize;

View File

@ -37,7 +37,7 @@ type
PMemoryManager = ^TMemoryManager; PMemoryManager = ^TMemoryManager;
TMemoryManager = record TMemoryManager = record
NeedLock : boolean; NeedLock : boolean; // Obsolete
Getmem : Function(Size:ptruint):Pointer; Getmem : Function(Size:ptruint):Pointer;
Freemem : Function(p:pointer):ptruint; Freemem : Function(p:pointer):ptruint;
FreememSize : Function(p:pointer;Size:ptruint):ptruint; FreememSize : Function(p:pointer;Size:ptruint):ptruint;

View File

@ -767,7 +767,7 @@ end;
Procedure system_exit;forward; Procedure system_exit;forward;
{$ifdef FPC_HAS_FEATURE_HEAP} {$ifdef FPC_HAS_FEATURE_HEAP}
{$if not (defined(HAS_MEMORYMANAGER) or defined(HAS_MT_MEMORYMANAGER))} {$ifndef HAS_MEMORYMANAGER}
//not needed if independant memory manager //not needed if independant memory manager
Procedure FinalizeHeap;forward; Procedure FinalizeHeap;forward;
{$endif HAS_MEMORYMANAGER} {$endif HAS_MEMORYMANAGER}
@ -829,7 +829,7 @@ Begin
{$endif} {$endif}
{$ifdef FPC_HAS_FEATURE_HEAP} {$ifdef FPC_HAS_FEATURE_HEAP}
{$if not (defined(HAS_MEMORYMANAGER) or defined(HAS_MT_MEMORYMANAGER))} {$ifndef HAS_MEMORYMANAGER}
FinalizeHeap; FinalizeHeap;
{$endif HAS_MEMORYMANAGER} {$endif HAS_MEMORYMANAGER}
{$endif FPC_HAS_FEATURE_HEAP} {$endif FPC_HAS_FEATURE_HEAP}

View File

@ -24,7 +24,7 @@ interface
{$define WINCE_EXCEPTION_HANDLING} {$define WINCE_EXCEPTION_HANDLING}
{$define DISABLE_NO_THREAD_MANAGER} {$define DISABLE_NO_THREAD_MANAGER}
{$define HAS_CMDLINE} {$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} {$define HAS_WIDESTRINGMANAGER}
{ include system-independent routine headers } { include system-independent routine headers }
@ -1585,7 +1585,7 @@ procedure InitWinCEWidestrings;
end; end;
{$IFDEF HAS_MT_MEMORYMANAGER} {$IFDEF HAS_MEMORYMANAGER}
{**************************************************************************** {****************************************************************************
Memory manager Memory manager
@ -1652,7 +1652,7 @@ begin
fillchar(Result,sizeof(Result),0); fillchar(Result,sizeof(Result),0);
end; end;
{$ENDIF HAS_MT_MEMORYMANAGER} {$ENDIF HAS_MEMORYMANAGER}
{**************************************************************************** {****************************************************************************
Error Message writing using messageboxes Error Message writing using messageboxes
@ -1800,10 +1800,10 @@ initialization
if not IsLibrary then if not IsLibrary then
SysInstance:=GetModuleHandle(nil); SysInstance:=GetModuleHandle(nil);
MainInstance:=SysInstance; MainInstance:=SysInstance;
{$IFNDEF HAS_MT_MEMORYMANAGER} {$IFNDEF HAS_MEMORYMANAGER}
{ Setup Heap } { Setup Heap }
InitHeap; InitHeap;
{$ENDIF HAS_MT_MEMORYMANAGER} {$ENDIF HAS_MEMORYMANAGER}
SysInitExceptions; SysInitExceptions;
if not IsLibrary then if not IsLibrary then
begin begin