update to 0.7.0
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
This file is used by the project manager only and should be treated like the project file
|
||||
|
||||
|
140
contrib/FastMM4-AVX/Replacement BorlndMM DLL/BCB6/BorlndMM.bpr
Normal file
140
contrib/FastMM4-AVX/Replacement BorlndMM DLL/BCB6/BorlndMM.bpr
Normal file
@@ -0,0 +1,140 @@
|
||||
<?xml version='1.0' encoding='utf-8' ?>
|
||||
<!-- C++Builder XML Project -->
|
||||
<PROJECT>
|
||||
<MACROS>
|
||||
<VERSION value="BCB.06.00"/>
|
||||
<PROJECT value="BorlndMM.dll"/>
|
||||
<OBJFILES value="DLLEntry.obj BorlndMM_.obj FastMM4.obj FastMM4BCB.obj"/>
|
||||
<RESFILES value="BorlndMM.res"/>
|
||||
<IDLFILES value=""/>
|
||||
<IDLGENFILES value=""/>
|
||||
<DEFFILE value="Export.def"/>
|
||||
<RESDEPEN value="$(RESFILES)"/>
|
||||
<LIBFILES value=""/>
|
||||
<LIBRARIES value=""/>
|
||||
<SPARELIBS value="vcldb.lib dbrtl.lib adortl.lib bdertl.lib vcldbx.lib ibxpress.lib cds.lib
|
||||
dsnap.lib bdecds.lib qrpt.lib teeui.lib teedb.lib tee.lib dss.lib
|
||||
teeqr.lib visualdbclx.lib dsnapcrba.lib dsnapcon.lib bcbsmp.lib"/>
|
||||
<PACKAGES value="vcl.bpi rtl.bpi dbrtl.bpi adortl.bpi vcldb.bpi vclx.bpi bdertl.bpi
|
||||
vcldbx.bpi ibxpress.bpi cds.bpi dsnap.bpi bdecds.bpi qrpt.bpi teeui.bpi
|
||||
teedb.bpi tee.bpi dss.bpi teeqr.bpi visualclx.bpi visualdbclx.bpi
|
||||
dsnapcrba.bpi dsnapcon.bpi bcbsmp.bpi"/>
|
||||
<PATHCPP value=".;"/>
|
||||
<PATHPAS value=".;"/>
|
||||
<PATHRC value=".;"/>
|
||||
<PATHASM value=".;"/>
|
||||
<DEBUGLIBPATH value="$(BCB)\lib\debug"/>
|
||||
<RELEASELIBPATH value="$(BCB)\lib\release"/>
|
||||
<LINKER value="ilink32"/>
|
||||
<USERDEFINES value="_DEBUG"/>
|
||||
<SYSDEFINES value="NO_STRICT;_NO_VCL;USEPACKAGES"/>
|
||||
<MAINSOURCE value="BorlndMM.bpf"/>
|
||||
<INCLUDEPATH value=""F:\FastMM492\FastMM4\Replacement BorlndMM DLL\BCB6";$(BCB)\include;$(BCB)\include\vcl"/>
|
||||
<LIBPATH value=""F:\FastMM492\FastMM4\Replacement BorlndMM DLL\BCB6";$(BCB)\lib\obj;$(BCB)\lib"/>
|
||||
<WARNINGS value="-w-par"/>
|
||||
<OTHERFILES value=""/>
|
||||
</MACROS>
|
||||
<OPTIONS>
|
||||
<IDLCFLAGS value="-I"F:\FastMM492\FastMM4\Replacement BorlndMM DLL\BCB6" -I$(BCB)\include
|
||||
-I$(BCB)\include\vcl -src_suffix cpp -D_DEBUG -boa"/>
|
||||
<CFLAG1 value="-WD -O2 -H=$(BCB)\lib\vcl60.csm -Hc -Vx -Ve -X- -r- -a8 -b- -k- -y -v -vi-
|
||||
-tWD -tWM -c"/>
|
||||
<PFLAGS value="-$YD -$W -$O- -$A8 -v -JPHNE -M"/>
|
||||
<RFLAGS value=""/>
|
||||
<AFLAGS value="/mx /w2 /zi"/>
|
||||
<LFLAGS value="-D"" -B:0x1190000 -aa -Tpd -x -Gn -v"/>
|
||||
<OTHERFILES value=""/>
|
||||
</OPTIONS>
|
||||
<LINKER>
|
||||
<ALLOBJ value="c0d32.obj $(PACKAGES) $(OBJFILES)"/>
|
||||
<ALLRES value="$(RESFILES)"/>
|
||||
<ALLLIB value="$(LIBFILES) $(LIBRARIES) import32.lib cw32mt.lib"/>
|
||||
<OTHERFILES value=""/>
|
||||
</LINKER>
|
||||
<FILELIST>
|
||||
<FILE FILENAME="BorlndMM.res" FORMNAME="" UNITNAME="BorlndMM.res" CONTAINERID="ResTool" DESIGNCLASS="" LOCALCOMMAND=""/>
|
||||
<FILE FILENAME="BorlndMM.bpf" FORMNAME="" UNITNAME="BorlndMM" CONTAINERID="BPF" DESIGNCLASS="" LOCALCOMMAND=""/>
|
||||
<FILE FILENAME="DLLEntry.cpp" FORMNAME="" UNITNAME="DLLEntry" CONTAINERID="CCompiler" DESIGNCLASS="" LOCALCOMMAND=""/>
|
||||
<FILE FILENAME="BorlndMM_.pas" FORMNAME="" UNITNAME="BorlndMM_" CONTAINERID="PascalCompiler" DESIGNCLASS="" LOCALCOMMAND=""/>
|
||||
<FILE FILENAME="FastMM4.pas" FORMNAME="" UNITNAME="FastMM4" CONTAINERID="PascalCompiler" DESIGNCLASS="" LOCALCOMMAND=""/>
|
||||
<FILE FILENAME="FastMM4BCB.cpp" FORMNAME="" UNITNAME="FastMM4BCB" CONTAINERID="CCompiler" DESIGNCLASS="" LOCALCOMMAND=""/>
|
||||
<FILE FILENAME="Export.def" FORMNAME="" UNITNAME="Export.def" CONTAINERID="DefTool" DESIGNCLASS="" LOCALCOMMAND=""/>
|
||||
</FILELIST>
|
||||
<BUILDTOOLS>
|
||||
</BUILDTOOLS>
|
||||
|
||||
<IDEOPTIONS>
|
||||
[Version Info]
|
||||
IncludeVerInfo=0
|
||||
AutoIncBuild=0
|
||||
MajorVer=1
|
||||
MinorVer=0
|
||||
Release=0
|
||||
Build=0
|
||||
Debug=0
|
||||
PreRelease=0
|
||||
Special=0
|
||||
Private=0
|
||||
DLL=0
|
||||
Locale=2052
|
||||
CodePage=936
|
||||
|
||||
[Version Info Keys]
|
||||
CompanyName=
|
||||
FileDescription=
|
||||
FileVersion=1.0.0.0
|
||||
InternalName=
|
||||
LegalCopyright=
|
||||
LegalTrademarks=
|
||||
OriginalFilename=
|
||||
ProductName=
|
||||
ProductVersion=1.0.0.0
|
||||
Comments=
|
||||
|
||||
[HistoryLists\hlIncludePath]
|
||||
Count=1
|
||||
Item0=F:\FastMM492\FastMM4\Replacement BorlndMM DLL\BCB6;$(BCB)\include;$(BCB)\include\vcl
|
||||
|
||||
[HistoryLists\hlLibraryPath]
|
||||
Count=1
|
||||
Item0=F:\FastMM492\FastMM4\Replacement BorlndMM DLL\BCB6;$(BCB)\lib\obj;$(BCB)\lib
|
||||
|
||||
[HistoryLists\hlDebugSourcePath]
|
||||
Count=1
|
||||
Item0=$(BCB)\source\vcl
|
||||
|
||||
[HistoryLists\hlConditionals]
|
||||
Count=1
|
||||
Item0=_DEBUG
|
||||
|
||||
[Debugging]
|
||||
DebugSourceDirs=$(BCB)\source\vcl
|
||||
|
||||
[Parameters]
|
||||
RunParams=
|
||||
Launcher=
|
||||
UseLauncher=0
|
||||
DebugCWD=
|
||||
HostApplication=
|
||||
RemoteHost=
|
||||
RemotePath=
|
||||
RemoteLauncher=
|
||||
RemoteCWD=
|
||||
RemoteDebug=0
|
||||
|
||||
[Compiler]
|
||||
ShowInfoMsgs=0
|
||||
LinkDebugVcl=1
|
||||
LinkCGLIB=0
|
||||
|
||||
[CORBA]
|
||||
AddServerUnit=1
|
||||
AddClientUnit=1
|
||||
PrecompiledHeaders=1
|
||||
|
||||
[Linker]
|
||||
LibPrefix=
|
||||
LibSuffix=
|
||||
LibVersion=
|
||||
</IDEOPTIONS>
|
||||
</PROJECT>
|
254
contrib/FastMM4-AVX/Replacement BorlndMM DLL/BCB6/BorlndMM_.pas
Normal file
254
contrib/FastMM4-AVX/Replacement BorlndMM DLL/BCB6/BorlndMM_.pas
Normal file
@@ -0,0 +1,254 @@
|
||||
unit BorlndMM_;
|
||||
|
||||
interface
|
||||
|
||||
{--------------------Start of options block-------------------------}
|
||||
|
||||
{Set the following option to use the RTL MM instead of FastMM. Setting this
|
||||
option makes this replacement DLL almost identical to the default
|
||||
borlndmm.dll, unless the "FullDebugMode" option is also set.}
|
||||
{.$define UseRTLMM}
|
||||
|
||||
{--------------------End of options block-------------------------}
|
||||
|
||||
{$Include FastMM4Options.inc}
|
||||
|
||||
{Cannot use the RTL MM with full debug mode}
|
||||
{$ifdef FullDebugMode}
|
||||
{$undef UseRTLMM}
|
||||
{$endif}
|
||||
|
||||
{$OBJEXPORTALL OFF}
|
||||
|
||||
function GetAllocMemCount: integer;
|
||||
function GetAllocMemSize: integer;
|
||||
procedure DumpBlocks;
|
||||
function HeapRelease: Integer;
|
||||
function HeapAddRef: Integer;
|
||||
function SysReallocMem(P: Pointer; Size: Integer): Pointer;
|
||||
function SysFreeMem(P: Pointer): Integer;
|
||||
function SysGetMem(Size: Integer): Pointer;
|
||||
{$ifdef BDS2006AndUp}
|
||||
function SysAllocMem(Size: Cardinal): Pointer;
|
||||
{$endif}
|
||||
|
||||
function ReallocMemory(P: Pointer; Size: Integer): Pointer; cdecl;
|
||||
function FreeMemory(P: Pointer): Integer; cdecl;
|
||||
function GetMemory(Size: Integer): Pointer; cdecl;
|
||||
|
||||
function GetHeapStatus: THeapStatus;
|
||||
{$ifdef BDS2006AndUp}
|
||||
function RegisterExpectedMemoryLeak(ALeakedPointer: Pointer): Boolean;
|
||||
function UnregisterExpectedMemoryLeak(ALeakedPointer: Pointer): Boolean;
|
||||
{$endif}
|
||||
|
||||
implementation
|
||||
|
||||
{$ifndef UseRTLMM}
|
||||
uses
|
||||
FastMM4;
|
||||
{$endif}
|
||||
|
||||
{$OPTIMIZATION ON}
|
||||
{$STACKFRAMES OFF}
|
||||
{$RANGECHECKS OFF}
|
||||
{$OVERFLOWCHECKS OFF}
|
||||
|
||||
{$ifdef NoDebugInfo}
|
||||
{$DEBUGINFO OFF}
|
||||
{$endif}
|
||||
|
||||
//Export: GetAllocMemCount
|
||||
//Symbol: @Borlndmm@GetAllocMemCount$qqrv
|
||||
function GetAllocMemCount: integer;
|
||||
begin
|
||||
{Return stats for the RTL MM only}
|
||||
{$ifdef UseRTLMM}
|
||||
Result := System.AllocMemCount;
|
||||
{$else}
|
||||
Result := 0;
|
||||
{$endif}
|
||||
end;
|
||||
|
||||
//Export: GetAllocMemSize
|
||||
//Symbol: @Borlndmm@GetAllocMemSize$qqrv
|
||||
function GetAllocMemSize: integer;
|
||||
begin
|
||||
{Return stats for the RTL MM only}
|
||||
{$ifdef UseRTLMM}
|
||||
Result := System.AllocMemSize;
|
||||
{$else}
|
||||
Result := 0;
|
||||
{$endif}
|
||||
end;
|
||||
|
||||
//Export: DumpBlocks
|
||||
//Symbol: @Borlndmm@DumpBlocks$qqrv
|
||||
procedure DumpBlocks;
|
||||
begin
|
||||
{Do nothing}
|
||||
end;
|
||||
|
||||
//Export: @Borlndmm@HeapRelease$qqrv
|
||||
//Symbol: @Borlndmm@HeapRelease$qqrv
|
||||
function HeapRelease: Integer;
|
||||
begin
|
||||
{Do nothing}
|
||||
Result := 2;
|
||||
end;
|
||||
|
||||
//Export: @Borlndmm@HeapAddRef$qqrv
|
||||
//Symbol: @Borlndmm@HeapAddRef$qqrv
|
||||
function HeapAddRef: Integer;
|
||||
begin
|
||||
{Do nothing}
|
||||
Result := 2;
|
||||
end;
|
||||
|
||||
//Export: GetHeapStatus
|
||||
//Symbol: @Borlndmm@GetHeapStatus$qqrv
|
||||
function GetHeapStatus: THeapStatus;
|
||||
begin
|
||||
{$ifndef UseRTLMM}
|
||||
Result := FastGetHeapStatus;
|
||||
{$else}
|
||||
Result := System.GetHeapStatus;
|
||||
{$endif}
|
||||
end;
|
||||
|
||||
|
||||
//Export: ReallocMemory
|
||||
//Symbol: @Borlndmm@ReallocMemory$qpvi
|
||||
function ReallocMemory(P: Pointer; Size: Integer): Pointer; cdecl;
|
||||
begin
|
||||
Result := System.ReallocMemory(P, Size);
|
||||
end;
|
||||
|
||||
//Export: FreeMemory
|
||||
//Symbol: @Borlndmm@FreeMemory$qpv
|
||||
function FreeMemory(P: Pointer): Integer; cdecl;
|
||||
begin
|
||||
Result := System.FreeMemory(P);
|
||||
end;
|
||||
|
||||
//Export: GetMemory
|
||||
//Symbol: @Borlndmm@GetMemory$qi
|
||||
function GetMemory(Size: Integer): Pointer; cdecl;
|
||||
begin
|
||||
Result := System.GetMemory(Size);
|
||||
end;
|
||||
|
||||
|
||||
//Export: @Borlndmm@SysReallocMem$qqrpvi
|
||||
//Symbol: @Borlndmm@SysReallocMem$qqrpvi
|
||||
function SysReallocMem(P: Pointer; Size: Integer): Pointer;
|
||||
begin
|
||||
{$ifndef UseRTLMM}
|
||||
{$ifndef FullDebugMode}
|
||||
Result := FastReallocMem(P, Size);
|
||||
{$else}
|
||||
Result := DebugReallocMem(P, Size);
|
||||
{$endif}
|
||||
{$else}
|
||||
Result := System.SysReallocMem(P, Size);
|
||||
{$endif}
|
||||
end;
|
||||
|
||||
//Export: @Borlndmm@SysFreeMem$qqrpv
|
||||
//Symbol: @Borlndmm@SysFreeMem$qqrpv
|
||||
function SysFreeMem(P: Pointer): Integer;
|
||||
begin
|
||||
{$ifndef UseRTLMM}
|
||||
{$ifndef FullDebugMode}
|
||||
Result := FastFreeMem(P);
|
||||
{$else}
|
||||
Result := DebugFreeMem(P);
|
||||
{$endif}
|
||||
{$else}
|
||||
Result := System.SysFreeMem(P);
|
||||
{$endif}
|
||||
end;
|
||||
|
||||
//Export: @Borlndmm@SysGetMem$qqri
|
||||
//Symbol: @Borlndmm@SysGetMem$qqri
|
||||
function SysGetMem(Size: Integer): Pointer;
|
||||
begin
|
||||
{$ifndef UseRTLMM}
|
||||
{$ifndef FullDebugMode}
|
||||
Result := FastGetMem(Size);
|
||||
{$else}
|
||||
Result := DebugGetMem(Size);
|
||||
{$endif}
|
||||
{$else}
|
||||
Result := System.SysGetMem(Size);
|
||||
{$endif}
|
||||
end;
|
||||
|
||||
//Export: @Borlndmm@SysAllocMem$qqri
|
||||
//Symbol: @Borlndmm@SysAllocMem$qqrui
|
||||
function SysAllocMem(Size: Cardinal): Pointer;
|
||||
begin
|
||||
{$ifndef UseRTLMM}
|
||||
{$ifndef FullDebugMode}
|
||||
Result := FastAllocMem(Size);
|
||||
{$else}
|
||||
Result := DebugAllocMem(Size);
|
||||
{$endif}
|
||||
{$else}
|
||||
//{$ifdef VER180}
|
||||
{$if RTLVersion >= 18}
|
||||
Result := System.SysAllocMem(Size);
|
||||
{$ifend}
|
||||
{$if RTLVersion < 18}
|
||||
Result := System.AllocMem(Size);
|
||||
{$ifend}
|
||||
{$endif}
|
||||
end;
|
||||
|
||||
|
||||
//Export: @Borlndmm@SysUnregisterExpectedMemoryLeak$qqrpi
|
||||
//Symbol: @Borlndmm@UnregisterExpectedMemoryLeak$qqrpv
|
||||
function UnregisterExpectedMemoryLeak(ALeakedPointer: Pointer): Boolean;
|
||||
begin
|
||||
{$ifndef UseRTLMM}
|
||||
{$ifdef EnableMemoryLeakReporting}
|
||||
Result := UnregisterExpectedMemoryLeak(ALeakedPointer);
|
||||
{$else}
|
||||
Result := False;
|
||||
{$endif}
|
||||
{$else}
|
||||
//{$ifdef VER180}
|
||||
{$if RTLVersion >= 18}
|
||||
Result := System.SysUnregisterExpectedMemoryLeak(ALeakedPointer);
|
||||
{$ifend}
|
||||
{$if RTLVersion < 18}
|
||||
Result := False;
|
||||
{$ifend}
|
||||
{$endif}
|
||||
end;
|
||||
|
||||
//Export: @Borlndmm@SysRegisterExpectedMemoryLeak$qqrpi
|
||||
//Symbol: @Borlndmm@RegisterExpectedMemoryLeak$qqrpv
|
||||
function RegisterExpectedMemoryLeak(ALeakedPointer: Pointer): Boolean;
|
||||
begin
|
||||
{$ifndef UseRTLMM}
|
||||
{$ifdef EnableMemoryLeakReporting}
|
||||
Result := RegisterExpectedMemoryLeak(ALeakedPointer);
|
||||
{$else}
|
||||
Result := False;
|
||||
{$endif}
|
||||
{$else}
|
||||
//{$ifdef VER180}
|
||||
{$if RTLVersion >= 18}
|
||||
Result := System.SysRegisterExpectedMemoryLeak(ALeakedPointer);
|
||||
{$ifend}
|
||||
{$if RTLVersion < 18}
|
||||
Result := False;
|
||||
{$ifend}
|
||||
{$endif}
|
||||
end;
|
||||
|
||||
initialization
|
||||
IsMultiThread := True;
|
||||
finalization
|
||||
end.
|
@@ -0,0 +1,31 @@
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
#include <windows.h>
|
||||
//---------------------------------------------------------------------------
|
||||
// Important note about DLL memory management when your DLL uses the
|
||||
// static version of the RunTime Library:
|
||||
//
|
||||
// If your DLL exports any functions that pass String objects (or structs/
|
||||
// classes containing nested Strings) as parameter or function results,
|
||||
// you will need to add the library MEMMGR.LIB to both the DLL project and
|
||||
// any other projects that use the DLL. You will also need to use MEMMGR.LIB
|
||||
// if any other projects which use the DLL will be performing new or delete
|
||||
// operations on any non-TObject-derived classes which are exported from the
|
||||
// DLL. Adding MEMMGR.LIB to your project will change the DLL and its calling
|
||||
// EXE's to use the BORLNDMM.DLL as their memory manager. In these cases,
|
||||
// the file BORLNDMM.DLL should be deployed along with your DLL.
|
||||
//
|
||||
// To avoid using BORLNDMM.DLL, pass string information using "char *" or
|
||||
// ShortString parameters.
|
||||
//
|
||||
// If your DLL uses the dynamic version of the RTL, you do not need to
|
||||
// explicitly add MEMMGR.LIB as this will be done implicitly for you
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
#pragma argsused
|
||||
int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void* lpReserved)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
29
contrib/FastMM4-AVX/Replacement BorlndMM DLL/BCB6/Export.def
Normal file
29
contrib/FastMM4-AVX/Replacement BorlndMM DLL/BCB6/Export.def
Normal file
@@ -0,0 +1,29 @@
|
||||
LIBRARY BORLNDMM.DLL
|
||||
|
||||
EXPORTS
|
||||
GetAllocMemCount = @Borlndmm_@GetAllocMemCount$qqrv ;To make it the 2nd export, ___CPPdebugHook always the 1st export
|
||||
GetAllocMemSize = @Borlndmm_@GetAllocMemSize$qqrv
|
||||
GetHeapStatus = @Borlndmm_@GetHeapStatus$qqrv
|
||||
DumpBlocks = @Borlndmm_@DumpBlocks$qqrv
|
||||
ReallocMemory = @Borlndmm_@ReallocMemory$qpvi
|
||||
FreeMemory = @Borlndmm_@FreeMemory$qpv
|
||||
GetMemory = @Borlndmm_@GetMemory$qi
|
||||
|
||||
;@Borlndmm@SysUnregisterExpectedMemoryLeak$qqrpi = @Borlndmm_@UnregisterExpectedMemoryLeak$qqrpv
|
||||
;@Borlndmm@SysRegisterExpectedMemoryLeak$qqrpi = @Borlndmm_@RegisterExpectedMemoryLeak$qqrpv
|
||||
|
||||
;@Borlndmm@SysAllocMem$qqri = @Borlndmm_@SysAllocMem$qqrui
|
||||
@Borlndmm@SysReallocMem$qqrpvi = @Borlndmm_@SysReallocMem$qqrpvi
|
||||
@Borlndmm@SysFreeMem$qqrpv = @Borlndmm_@SysFreeMem$qqrpv
|
||||
@Borlndmm@SysGetMem$qqri = @Borlndmm_@SysGetMem$qqri
|
||||
|
||||
@Borlndmm@HeapRelease$qqrv = @Borlndmm_@HeapRelease$qqrv
|
||||
@Borlndmm@HeapAddRef$qqrv = @Borlndmm_@HeapAddRef$qqrv
|
||||
|
||||
;SetMMLogFileName = @Fastmm4@SetMMLogFileName$qqrpc
|
||||
;GetCurrentAllocationGroup = @Fastmm4@GetCurrentAllocationGroup$qqrv
|
||||
;PushAllocationGroup = @Fastmm4@PushAllocationGroup$qqrui
|
||||
;PopAllocationGroup = @Fastmm4@PopAllocationGroup$qqrv
|
||||
;LogAllocatedBlocksToFile = @Fastmm4@LogAllocatedBlocksToFile$qqruiui
|
||||
|
||||
|
Reference in New Issue
Block a user