mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-02 21:58:29 +02:00
* Removed HAS_MT_MEMORYMANAGER define, since it is obsolete now.
git-svn-id: trunk@9556 -
This commit is contained in:
parent
93e62a3c0d
commit
e00bacdcef
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user