update to 0.7.0
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
object fAppMain: TfAppMain
|
||||
Left = 0
|
||||
Top = 0
|
||||
Caption = 'FastMM Sharing Test Application'
|
||||
ClientHeight = 208
|
||||
ClientWidth = 300
|
||||
Color = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object Button1: TButton
|
||||
Left = 8
|
||||
Top = 172
|
||||
Width = 281
|
||||
Height = 25
|
||||
Caption = 'Load DLL and Display DLL Form'
|
||||
TabOrder = 0
|
||||
OnClick = Button1Click
|
||||
end
|
||||
object Memo1: TMemo
|
||||
Left = 8
|
||||
Top = 8
|
||||
Width = 281
|
||||
Height = 157
|
||||
Enabled = False
|
||||
Lines.Strings = (
|
||||
'This application shows how to share FastMM between '
|
||||
'an application and dynamically loaded DLL, without '
|
||||
'using the borlndmm.dll library.'
|
||||
''
|
||||
'Click the button to load the test DLL and display its '
|
||||
'form.'
|
||||
''
|
||||
'The relevant settings for this application:'
|
||||
'1) FastMM4.pas is the first unit in the uses clause '
|
||||
'2) The "ShareMM" option is enabled'
|
||||
'3) "Use Runtime Packages" is disabled'
|
||||
'')
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
@@ -0,0 +1,51 @@
|
||||
unit ApplicationForm;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, StdCtrls;
|
||||
|
||||
type
|
||||
TfAppMain = class(TForm)
|
||||
Button1: TButton;
|
||||
Memo1: TMemo;
|
||||
procedure Button1Click(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
fAppMain: TfAppMain;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfAppMain.Button1Click(Sender: TObject);
|
||||
var
|
||||
LDLLHandle: HModule;
|
||||
LShowProc: TProcedure;
|
||||
begin
|
||||
LDLLHandle := LoadLibrary('TestDLL.dll');
|
||||
if LDLLHandle <> 0 then
|
||||
begin
|
||||
try
|
||||
LShowProc := GetProcAddress(LDLLHandle, 'ShowDLLForm');
|
||||
if Assigned(LShowProc) then
|
||||
begin
|
||||
LShowProc;
|
||||
end
|
||||
else
|
||||
ShowMessage('The ShowDLLForm procedure could not be found in the DLL.');
|
||||
finally
|
||||
FreeLibrary(LDLLHandle);
|
||||
end;
|
||||
end
|
||||
else
|
||||
ShowMessage('The DLL was not found. Please compile the DLL before running this application.');
|
||||
end;
|
||||
|
||||
end.
|
54
contrib/FastMM4-AVX/Demos/Dynamically Loaded DLL/DLLForm.dfm
Normal file
54
contrib/FastMM4-AVX/Demos/Dynamically Loaded DLL/DLLForm.dfm
Normal file
@@ -0,0 +1,54 @@
|
||||
object fDLLMain: TfDLLMain
|
||||
Left = 0
|
||||
Top = 0
|
||||
Caption = 'FastMM Sharing DLL Form'
|
||||
ClientHeight = 185
|
||||
ClientWidth = 337
|
||||
Color = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object Button1: TButton
|
||||
Left = 8
|
||||
Top = 152
|
||||
Width = 165
|
||||
Height = 25
|
||||
Caption = 'Click to leak some memory'
|
||||
TabOrder = 0
|
||||
OnClick = Button1Click
|
||||
end
|
||||
object Memo1: TMemo
|
||||
Left = 8
|
||||
Top = 8
|
||||
Width = 317
|
||||
Height = 137
|
||||
Enabled = False
|
||||
Lines.Strings = (
|
||||
'This DLL is sharing the memory manager of the main '
|
||||
'application. '
|
||||
''
|
||||
'The following settings were used to achieve this:'
|
||||
|
||||
'1) FastMM4.pas is the first unit in the "uses" clause of the .dp' +
|
||||
'r'
|
||||
'2) The "ShareMM" option is enabled.'
|
||||
'3) The "AttemptToUseSharedMM" option is enabled.'
|
||||
''
|
||||
'Click the button to leak some memory.')
|
||||
TabOrder = 1
|
||||
end
|
||||
object Button2: TButton
|
||||
Left = 180
|
||||
Top = 152
|
||||
Width = 145
|
||||
Height = 25
|
||||
Caption = 'Unload DLL'
|
||||
TabOrder = 2
|
||||
OnClick = Button2Click
|
||||
end
|
||||
end
|
39
contrib/FastMM4-AVX/Demos/Dynamically Loaded DLL/DLLForm.pas
Normal file
39
contrib/FastMM4-AVX/Demos/Dynamically Loaded DLL/DLLForm.pas
Normal file
@@ -0,0 +1,39 @@
|
||||
unit DLLForm;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, StdCtrls;
|
||||
|
||||
type
|
||||
TfDLLMain = class(TForm)
|
||||
Button1: TButton;
|
||||
Memo1: TMemo;
|
||||
Button2: TButton;
|
||||
procedure Button1Click(Sender: TObject);
|
||||
procedure Button2Click(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
fDLLMain: TfDLLMain;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfDLLMain.Button1Click(Sender: TObject);
|
||||
begin
|
||||
TObject.Create;
|
||||
end;
|
||||
|
||||
procedure TfDLLMain.Button2Click(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
end;
|
||||
|
||||
end.
|
@@ -0,0 +1,44 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{39e9f19f-728b-49d7-8ea1-18ef0776485d}</ProjectGuid>
|
||||
</PropertyGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<Projects Include="TestApplication.dproj" />
|
||||
<Projects Include="TestDLL.dproj" />
|
||||
</ItemGroup>
|
||||
<ProjectExtensions>
|
||||
<Borland.Personality>Default.Personality</Borland.Personality>
|
||||
<Borland.ProjectType />
|
||||
<BorlandProject>
|
||||
<BorlandProject xmlns=""> <Default.Personality> </Default.Personality> </BorlandProject></BorlandProject>
|
||||
</ProjectExtensions>
|
||||
<Target Name="TestApplication">
|
||||
<MSBuild Projects="TestApplication.dproj" Targets="" />
|
||||
</Target>
|
||||
<Target Name="TestApplication:Clean">
|
||||
<MSBuild Projects="TestApplication.dproj" Targets="Clean" />
|
||||
</Target>
|
||||
<Target Name="TestApplication:Make">
|
||||
<MSBuild Projects="TestApplication.dproj" Targets="Make" />
|
||||
</Target>
|
||||
<Target Name="TestDLL">
|
||||
<MSBuild Projects="TestDLL.dproj" Targets="" />
|
||||
</Target>
|
||||
<Target Name="TestDLL:Clean">
|
||||
<MSBuild Projects="TestDLL.dproj" Targets="Clean" />
|
||||
</Target>
|
||||
<Target Name="TestDLL:Make">
|
||||
<MSBuild Projects="TestDLL.dproj" Targets="Make" />
|
||||
</Target>
|
||||
<Target Name="Build">
|
||||
<CallTarget Targets="TestApplication;TestDLL" />
|
||||
</Target>
|
||||
<Target Name="Clean">
|
||||
<CallTarget Targets="TestApplication:Clean;TestDLL:Clean" />
|
||||
</Target>
|
||||
<Target Name="Make">
|
||||
<CallTarget Targets="TestApplication:Make;TestDLL:Make" />
|
||||
</Target>
|
||||
<Import Condition="Exists('$(MSBuildBinPath)\Borland.Group.Targets')" Project="$(MSBuildBinPath)\Borland.Group.Targets" />
|
||||
</Project>
|
@@ -0,0 +1,14 @@
|
||||
program TestApplication;
|
||||
|
||||
uses
|
||||
FastMM4,
|
||||
Forms,
|
||||
ApplicationForm in 'ApplicationForm.pas' {fAppMain};
|
||||
|
||||
{$R *.res}
|
||||
|
||||
begin
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TfAppMain, fAppMain);
|
||||
Application.Run;
|
||||
end.
|
@@ -0,0 +1,71 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{ddb60ef2-54ec-4031-ade8-28222d2e51e3}</ProjectGuid>
|
||||
<MainSource>TestApplication.dpr</MainSource>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
|
||||
<DCC_DependencyCheckOutputName>TestApplication.exe</DCC_DependencyCheckOutputName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<Version>7.0</Version>
|
||||
<DCC_DebugInformation>False</DCC_DebugInformation>
|
||||
<DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols>
|
||||
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
|
||||
<DCC_Define>ShareMM;RELEASE</DCC_Define>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<Version>7.0</Version>
|
||||
<DCC_Define>ShareMM;DEBUG</DCC_Define>
|
||||
</PropertyGroup>
|
||||
<ProjectExtensions>
|
||||
<Borland.Personality>Delphi.Personality</Borland.Personality>
|
||||
<Borland.ProjectType />
|
||||
<BorlandProject>
|
||||
<BorlandProject xmlns=""> <Delphi.Personality> <Parameters>
|
||||
<Parameters Name="UseLauncher">False</Parameters>
|
||||
<Parameters Name="LoadAllSymbols">True</Parameters>
|
||||
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
|
||||
</Parameters>
|
||||
<VersionInfo>
|
||||
<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
|
||||
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
|
||||
<VersionInfo Name="MajorVer">1</VersionInfo>
|
||||
<VersionInfo Name="MinorVer">0</VersionInfo>
|
||||
<VersionInfo Name="Release">0</VersionInfo>
|
||||
<VersionInfo Name="Build">0</VersionInfo>
|
||||
<VersionInfo Name="Debug">False</VersionInfo>
|
||||
<VersionInfo Name="PreRelease">False</VersionInfo>
|
||||
<VersionInfo Name="Special">False</VersionInfo>
|
||||
<VersionInfo Name="Private">False</VersionInfo>
|
||||
<VersionInfo Name="DLL">False</VersionInfo>
|
||||
<VersionInfo Name="Locale">7177</VersionInfo>
|
||||
<VersionInfo Name="CodePage">1252</VersionInfo>
|
||||
</VersionInfo>
|
||||
<VersionInfoKeys>
|
||||
<VersionInfoKeys Name="CompanyName"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="InternalName"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="ProductName"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
|
||||
</VersionInfoKeys>
|
||||
<Source>
|
||||
<Source Name="MainSource">TestApplication.dpr</Source>
|
||||
</Source>
|
||||
</Delphi.Personality> </BorlandProject></BorlandProject>
|
||||
</ProjectExtensions>
|
||||
<Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" />
|
||||
<ItemGroup>
|
||||
<DelphiCompile Include="TestApplication.dpr">
|
||||
<MainSource>MainSource</MainSource>
|
||||
</DelphiCompile>
|
||||
<DCCReference Include="ApplicationForm.pas">
|
||||
<Form>fAppMain</Form>
|
||||
</DCCReference>
|
||||
</ItemGroup>
|
||||
</Project>
|
26
contrib/FastMM4-AVX/Demos/Dynamically Loaded DLL/TestDLL.dpr
Normal file
26
contrib/FastMM4-AVX/Demos/Dynamically Loaded DLL/TestDLL.dpr
Normal file
@@ -0,0 +1,26 @@
|
||||
library TestDLL;
|
||||
|
||||
uses
|
||||
FastMM4,
|
||||
SysUtils,
|
||||
Classes,
|
||||
DLLForm in 'DLLForm.pas' {fDLLMain};
|
||||
|
||||
{$R *.res}
|
||||
|
||||
procedure ShowDLLForm;
|
||||
begin
|
||||
with TfDLLMain.Create(nil) do
|
||||
begin
|
||||
try
|
||||
ShowModal;
|
||||
finally
|
||||
Free;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
exports ShowDllForm;
|
||||
|
||||
begin
|
||||
end.
|
@@ -0,0 +1,71 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{dc5ee909-443c-42e3-aed6-5b0de135122e}</ProjectGuid>
|
||||
<MainSource>TestDLL.dpr</MainSource>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
|
||||
<DCC_DependencyCheckOutputName>TestDLL.dll</DCC_DependencyCheckOutputName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<Version>7.0</Version>
|
||||
<DCC_DebugInformation>False</DCC_DebugInformation>
|
||||
<DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols>
|
||||
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
|
||||
<DCC_Define>ShareMM;AttemptToUseSharedMM;RELEASE</DCC_Define>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<Version>7.0</Version>
|
||||
<DCC_Define>ShareMM;AttemptToUseSharedMM;DEBUG</DCC_Define>
|
||||
</PropertyGroup>
|
||||
<ProjectExtensions>
|
||||
<Borland.Personality>Delphi.Personality</Borland.Personality>
|
||||
<Borland.ProjectType />
|
||||
<BorlandProject>
|
||||
<BorlandProject xmlns=""> <Delphi.Personality> <Parameters>
|
||||
<Parameters Name="UseLauncher">False</Parameters>
|
||||
<Parameters Name="LoadAllSymbols">True</Parameters>
|
||||
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
|
||||
</Parameters>
|
||||
<VersionInfo>
|
||||
<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
|
||||
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
|
||||
<VersionInfo Name="MajorVer">1</VersionInfo>
|
||||
<VersionInfo Name="MinorVer">0</VersionInfo>
|
||||
<VersionInfo Name="Release">0</VersionInfo>
|
||||
<VersionInfo Name="Build">0</VersionInfo>
|
||||
<VersionInfo Name="Debug">False</VersionInfo>
|
||||
<VersionInfo Name="PreRelease">False</VersionInfo>
|
||||
<VersionInfo Name="Special">False</VersionInfo>
|
||||
<VersionInfo Name="Private">False</VersionInfo>
|
||||
<VersionInfo Name="DLL">False</VersionInfo>
|
||||
<VersionInfo Name="Locale">7177</VersionInfo>
|
||||
<VersionInfo Name="CodePage">1252</VersionInfo>
|
||||
</VersionInfo>
|
||||
<VersionInfoKeys>
|
||||
<VersionInfoKeys Name="CompanyName"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="InternalName"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="ProductName"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
|
||||
</VersionInfoKeys>
|
||||
<Source>
|
||||
<Source Name="MainSource">TestDLL.dpr</Source>
|
||||
</Source>
|
||||
</Delphi.Personality> </BorlandProject></BorlandProject>
|
||||
</ProjectExtensions>
|
||||
<Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" />
|
||||
<ItemGroup>
|
||||
<DelphiCompile Include="TestDLL.dpr">
|
||||
<MainSource>MainSource</MainSource>
|
||||
</DelphiCompile>
|
||||
<DCCReference Include="DLLForm.pas">
|
||||
<Form>fDLLMain</Form>
|
||||
</DCCReference>
|
||||
</ItemGroup>
|
||||
</Project>
|
@@ -0,0 +1,44 @@
|
||||
object Form1: TForm1
|
||||
Left = 0
|
||||
Top = 0
|
||||
Caption = 'borlndmm.dll using FullDebugMode'
|
||||
ClientHeight = 146
|
||||
ClientWidth = 369
|
||||
Color = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object Button1: TButton
|
||||
Left = 24
|
||||
Top = 24
|
||||
Width = 321
|
||||
Height = 25
|
||||
Caption = 'Click this button to leak a TObject'
|
||||
TabOrder = 0
|
||||
OnClick = Button1Click
|
||||
end
|
||||
object Button2: TButton
|
||||
Left = 24
|
||||
Top = 60
|
||||
Width = 321
|
||||
Height = 25
|
||||
Caption = 'Click this button to test the allocation grouping functionality'
|
||||
TabOrder = 1
|
||||
OnClick = Button2Click
|
||||
end
|
||||
object Button3: TButton
|
||||
Left = 24
|
||||
Top = 96
|
||||
Width = 321
|
||||
Height = 25
|
||||
Caption = 'Cause a "virtual method on freed object" error'
|
||||
TabOrder = 2
|
||||
OnClick = Button3Click
|
||||
end
|
||||
end
|
@@ -0,0 +1,76 @@
|
||||
unit DemoForm;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, FastMMDebugSupport, StdCtrls;
|
||||
|
||||
type
|
||||
TForm1 = class(TForm)
|
||||
Button1: TButton;
|
||||
Button2: TButton;
|
||||
Button3: TButton;
|
||||
procedure Button3Click(Sender: TObject);
|
||||
procedure Button2Click(Sender: TObject);
|
||||
procedure Button1Click(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
Form1: TForm1;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TForm1.Button1Click(Sender: TObject);
|
||||
begin
|
||||
TObject.Create;
|
||||
end;
|
||||
|
||||
procedure TForm1.Button2Click(Sender: TObject);
|
||||
var
|
||||
x, y, z: TObject;
|
||||
begin
|
||||
{Set the allocation group to 1}
|
||||
PushAllocationGroup(1);
|
||||
{Allocate an object}
|
||||
x := TPersistent.Create;
|
||||
{Set the allocation group to 2}
|
||||
PushAllocationGroup(2);
|
||||
{Allocate a TControl}
|
||||
y := TControl.Create(nil);
|
||||
{Go back to allocation group 1}
|
||||
PopAllocationGroup;
|
||||
{Allocate a TWinControl}
|
||||
z := TWinControl.Create(nil);
|
||||
{Pop the last group off the stack}
|
||||
PopAllocationGroup;
|
||||
{Specify the name of the log file}
|
||||
SetMMLogFileName('AllocationGroupTest.log');
|
||||
{Log all live blocks in groups 1 and 2}
|
||||
LogAllocatedBlocksToFile(1, 2);
|
||||
{Restore the default log file name}
|
||||
SetMMLogFileName(nil);
|
||||
{Free all the objects}
|
||||
x.Free;
|
||||
y.Free;
|
||||
z.Free;
|
||||
{Done}
|
||||
ShowMessage('Allocation detail logged to file.');
|
||||
end;
|
||||
|
||||
procedure TForm1.Button3Click(Sender: TObject);
|
||||
begin
|
||||
with TObject.Create do
|
||||
begin
|
||||
Free;
|
||||
Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
@@ -0,0 +1,15 @@
|
||||
program FullDebugModeDemo;
|
||||
|
||||
uses
|
||||
ShareMem,
|
||||
Forms,
|
||||
DemoForm in 'DemoForm.pas' {Form1},
|
||||
FastMMDebugSupport in '..\..\Replacement BorlndMM DLL\Delphi\FastMMDebugSupport.pas';
|
||||
|
||||
{$R *.res}
|
||||
|
||||
begin
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TForm1, Form1);
|
||||
Application.Run;
|
||||
end.
|
28
contrib/FastMM4-AVX/Demos/Usage Tracker/DemoForm.dfm
Normal file
28
contrib/FastMM4-AVX/Demos/Usage Tracker/DemoForm.dfm
Normal file
@@ -0,0 +1,28 @@
|
||||
object fDemo: TfDemo
|
||||
Left = 199
|
||||
Top = 114
|
||||
BorderIcons = [biSystemMenu]
|
||||
BorderStyle = bsSingle
|
||||
Caption = 'Usage Tracker Demo'
|
||||
ClientHeight = 53
|
||||
ClientWidth = 239
|
||||
Color = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'MS Sans Serif'
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object bShowTracker: TButton
|
||||
Left = 8
|
||||
Top = 8
|
||||
Width = 221
|
||||
Height = 37
|
||||
Caption = 'Show Usage Tracker'
|
||||
TabOrder = 0
|
||||
OnClick = bShowTrackerClick
|
||||
end
|
||||
end
|
31
contrib/FastMM4-AVX/Demos/Usage Tracker/DemoForm.pas
Normal file
31
contrib/FastMM4-AVX/Demos/Usage Tracker/DemoForm.pas
Normal file
@@ -0,0 +1,31 @@
|
||||
unit DemoForm;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, StdCtrls, FastMMUsageTracker;
|
||||
|
||||
type
|
||||
TfDemo = class(TForm)
|
||||
bShowTracker: TButton;
|
||||
procedure bShowTrackerClick(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
public
|
||||
{ Public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
fDemo: TfDemo;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfDemo.bShowTrackerClick(Sender: TObject);
|
||||
begin
|
||||
ShowFastMMUsageTracker;
|
||||
end;
|
||||
|
||||
end.
|
264
contrib/FastMM4-AVX/Demos/Usage Tracker/FastMMUsageTracker.dfm
Normal file
264
contrib/FastMM4-AVX/Demos/Usage Tracker/FastMMUsageTracker.dfm
Normal file
@@ -0,0 +1,264 @@
|
||||
object fFastMMUsageTracker: TfFastMMUsageTracker
|
||||
Left = 460
|
||||
Top = 178
|
||||
BorderIcons = [biSystemMenu]
|
||||
BorderStyle = bsSingle
|
||||
Caption = 'FastMM Memory Usage Tracker'
|
||||
ClientHeight = 556
|
||||
ClientWidth = 553
|
||||
Color = clBtnFace
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'MS Sans Serif'
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poScreenCenter
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object bClose: TBitBtn
|
||||
Left = 472
|
||||
Top = 524
|
||||
Width = 75
|
||||
Height = 25
|
||||
Caption = 'Close'
|
||||
TabOrder = 0
|
||||
OnClick = bCloseClick
|
||||
Glyph.Data = {
|
||||
76010000424D7601000000000000760000002800000020000000100000000100
|
||||
04000000000000010000130B0000130B00001000000000000000000000000000
|
||||
800000800000008080008000000080008000808000007F7F7F00BFBFBF000000
|
||||
FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333333333
|
||||
3333333333FFFFF3333333333999993333333333F77777FFF333333999999999
|
||||
3333333777333777FF3333993333339993333377FF3333377FF3399993333339
|
||||
993337777FF3333377F3393999333333993337F777FF333337FF993399933333
|
||||
399377F3777FF333377F993339993333399377F33777FF33377F993333999333
|
||||
399377F333777FF3377F993333399933399377F3333777FF377F993333339993
|
||||
399377FF3333777FF7733993333339993933373FF3333777F7F3399933333399
|
||||
99333773FF3333777733339993333339933333773FFFFFF77333333999999999
|
||||
3333333777333777333333333999993333333333377777333333}
|
||||
NumGlyphs = 2
|
||||
end
|
||||
object bUpdate: TBitBtn
|
||||
Left = 392
|
||||
Top = 524
|
||||
Width = 75
|
||||
Height = 25
|
||||
Caption = 'Update'
|
||||
TabOrder = 1
|
||||
OnClick = bUpdateClick
|
||||
Glyph.Data = {
|
||||
76010000424D7601000000000000760000002800000020000000100000000100
|
||||
04000000000000010000120B0000120B00001000000000000000000000000000
|
||||
800000800000008080008000000080008000808000007F7F7F00BFBFBF000000
|
||||
FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00370777033333
|
||||
3330337F3F7F33333F3787070003333707303F737773333373F7007703333330
|
||||
700077337F3333373777887007333337007733F773F333337733700070333333
|
||||
077037773733333F7F37703707333300080737F373333377737F003333333307
|
||||
78087733FFF3337FFF7F33300033330008073F3777F33F777F73073070370733
|
||||
078073F7F7FF73F37FF7700070007037007837773777F73377FF007777700730
|
||||
70007733FFF77F37377707700077033707307F37773F7FFF7337080777070003
|
||||
3330737F3F7F777F333778080707770333333F7F737F3F7F3333080787070003
|
||||
33337F73FF737773333307800077033333337337773373333333}
|
||||
NumGlyphs = 2
|
||||
end
|
||||
object ChkAutoUpdate: TCheckBox
|
||||
Left = 280
|
||||
Top = 528
|
||||
Width = 97
|
||||
Height = 17
|
||||
Caption = 'Auto Update'
|
||||
TabOrder = 2
|
||||
OnClick = ChkAutoUpdateClick
|
||||
end
|
||||
object pcUsageTracker: TPageControl
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 553
|
||||
Height = 521
|
||||
ActivePage = tsAllocation
|
||||
Align = alTop
|
||||
TabOrder = 3
|
||||
object tsAllocation: TTabSheet
|
||||
Caption = 'FastMM4 Allocation'
|
||||
object sgBlockStatistics: TStringGrid
|
||||
Left = 4
|
||||
Top = 4
|
||||
Width = 533
|
||||
Height = 481
|
||||
DefaultColWidth = 83
|
||||
DefaultRowHeight = 17
|
||||
Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine]
|
||||
PopupMenu = smMM4Allocation
|
||||
ScrollBars = ssVertical
|
||||
TabOrder = 0
|
||||
OnDrawCell = sgBlockStatisticsDrawCell
|
||||
ColWidths = (
|
||||
83
|
||||
104
|
||||
106
|
||||
106
|
||||
108)
|
||||
end
|
||||
end
|
||||
object tsVMGraph: TTabSheet
|
||||
Caption = 'VM Graph'
|
||||
ImageIndex = 1
|
||||
object Label1: TLabel
|
||||
Left = 8
|
||||
Top = 440
|
||||
Width = 38
|
||||
Height = 13
|
||||
Caption = 'Address'
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 152
|
||||
Top = 440
|
||||
Width = 25
|
||||
Height = 13
|
||||
Caption = 'State'
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 8
|
||||
Top = 468
|
||||
Width = 43
|
||||
Height = 13
|
||||
Caption = 'Exe/DLL'
|
||||
end
|
||||
object eAddress: TEdit
|
||||
Left = 60
|
||||
Top = 436
|
||||
Width = 81
|
||||
Height = 21
|
||||
Enabled = False
|
||||
TabOrder = 0
|
||||
Text = '$00000000'
|
||||
end
|
||||
object eState: TEdit
|
||||
Left = 184
|
||||
Top = 436
|
||||
Width = 105
|
||||
Height = 21
|
||||
Enabled = False
|
||||
TabOrder = 1
|
||||
Text = 'Unallocated'
|
||||
end
|
||||
object eDLLName: TEdit
|
||||
Left = 60
|
||||
Top = 464
|
||||
Width = 477
|
||||
Height = 21
|
||||
ReadOnly = True
|
||||
TabOrder = 2
|
||||
end
|
||||
object ChkSmallGraph: TCheckBox
|
||||
Left = 304
|
||||
Top = 436
|
||||
Width = 97
|
||||
Height = 21
|
||||
Caption = 'Small Map'
|
||||
Checked = True
|
||||
State = cbChecked
|
||||
TabOrder = 3
|
||||
OnClick = ChkSmallGraphClick
|
||||
end
|
||||
object dgMemoryMap: TDrawGrid
|
||||
Left = 4
|
||||
Top = 4
|
||||
Width = 533
|
||||
Height = 425
|
||||
ColCount = 64
|
||||
DefaultColWidth = 8
|
||||
DefaultRowHeight = 8
|
||||
FixedCols = 0
|
||||
RowCount = 1024
|
||||
FixedRows = 0
|
||||
GridLineWidth = 0
|
||||
Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine]
|
||||
ScrollBars = ssVertical
|
||||
TabOrder = 4
|
||||
OnDrawCell = dgMemoryMapDrawCell
|
||||
OnSelectCell = dgMemoryMapSelectCell
|
||||
end
|
||||
end
|
||||
object tsVMDump: TTabSheet
|
||||
Caption = 'VM Dump'
|
||||
ImageIndex = 2
|
||||
object sgVMDump: TStringGrid
|
||||
Left = 4
|
||||
Top = 4
|
||||
Width = 533
|
||||
Height = 481
|
||||
DefaultColWidth = 83
|
||||
DefaultRowHeight = 17
|
||||
FixedCols = 0
|
||||
Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine]
|
||||
PopupMenu = smVMDump
|
||||
ScrollBars = ssVertical
|
||||
TabOrder = 0
|
||||
OnDrawCell = sgVMDumpDrawCell
|
||||
OnMouseDown = sgVMDumpMouseDown
|
||||
OnMouseUp = sgVMDumpMouseUp
|
||||
ColWidths = (
|
||||
83
|
||||
96
|
||||
60
|
||||
58
|
||||
209)
|
||||
end
|
||||
end
|
||||
object tsGeneralInformation: TTabSheet
|
||||
Caption = 'General Information'
|
||||
ImageIndex = 3
|
||||
object mVMStatistics: TMemo
|
||||
Left = 4
|
||||
Top = 4
|
||||
Width = 533
|
||||
Height = 481
|
||||
Font.Charset = ANSI_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Courier New'
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
PopupMenu = smGeneralInformation
|
||||
ReadOnly = True
|
||||
ScrollBars = ssVertical
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
end
|
||||
object tTimer: TTimer
|
||||
Enabled = False
|
||||
Interval = 2000
|
||||
OnTimer = tTimerTimer
|
||||
Left = 128
|
||||
Top = 512
|
||||
end
|
||||
object smVMDump: TPopupMenu
|
||||
Left = 100
|
||||
Top = 512
|
||||
object miVMDumpCopyAlltoClipboard: TMenuItem
|
||||
Caption = '&Copy All to Clipboard'
|
||||
OnClick = miVMDumpCopyAlltoClipboardClick
|
||||
end
|
||||
end
|
||||
object smGeneralInformation: TPopupMenu
|
||||
Left = 68
|
||||
Top = 512
|
||||
object miGeneralInformationCopyAlltoClipboard: TMenuItem
|
||||
Caption = '&Copy All to Clipboard'
|
||||
OnClick = miGeneralInformationCopyAlltoClipboardClick
|
||||
end
|
||||
end
|
||||
object smMM4Allocation: TPopupMenu
|
||||
Left = 36
|
||||
Top = 512
|
||||
object siMM4AllocationCopyAlltoClipboard: TMenuItem
|
||||
Caption = '&Copy All to Clipboard'
|
||||
OnClick = siMM4AllocationCopyAlltoClipboardClick
|
||||
end
|
||||
end
|
||||
end
|
1184
contrib/FastMM4-AVX/Demos/Usage Tracker/FastMMUsageTracker.pas
Normal file
1184
contrib/FastMM4-AVX/Demos/Usage Tracker/FastMMUsageTracker.pas
Normal file
File diff suppressed because it is too large
Load Diff
17
contrib/FastMM4-AVX/Demos/Usage Tracker/UsageTrackerDemo.dpr
Normal file
17
contrib/FastMM4-AVX/Demos/Usage Tracker/UsageTrackerDemo.dpr
Normal file
@@ -0,0 +1,17 @@
|
||||
program UsageTrackerDemo;
|
||||
|
||||
uses
|
||||
FastMM4,
|
||||
Forms,
|
||||
DemoForm in 'DemoForm.pas' {fDemo};
|
||||
|
||||
{$R *.res}
|
||||
|
||||
{Enable large address space support for this demo}
|
||||
{$SetPEFlags $20}
|
||||
|
||||
begin
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TfDemo, fDemo);
|
||||
Application.Run;
|
||||
end.
|
@@ -0,0 +1,69 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{2d29cca4-0633-47dd-b826-c21a24d53d83}</ProjectGuid>
|
||||
<MainSource>UsageTrackerDemo.dpr</MainSource>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
|
||||
<DCC_DependencyCheckOutputName>UsageTrackerDemo.exe</DCC_DependencyCheckOutputName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<Version>7.0</Version>
|
||||
<DCC_DebugInformation>False</DCC_DebugInformation>
|
||||
<DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols>
|
||||
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
|
||||
<DCC_Define>RELEASE</DCC_Define>
|
||||
<DCC_UnitSearchPath>..\..</DCC_UnitSearchPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<Version>7.0</Version>
|
||||
<DCC_Define>DEBUG</DCC_Define>
|
||||
<DCC_UnitSearchPath>..\..</DCC_UnitSearchPath>
|
||||
</PropertyGroup>
|
||||
<ProjectExtensions>
|
||||
<Borland.Personality>Delphi.Personality</Borland.Personality>
|
||||
<Borland.ProjectType>VCLApplication</Borland.ProjectType>
|
||||
<BorlandProject>
|
||||
<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><VersionInfo><VersionInfo Name="IncludeVerInfo">False</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">1</VersionInfo><VersionInfo Name="MinorVer">0</VersionInfo><VersionInfo Name="Release">0</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">7177</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName"></VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="InternalName"></VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName"></VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Excluded_Packages>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<Excluded_Packages Name="$(BDS)\bin\dclofficexp100.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
|
||||
<Excluded_Packages Name="$(BDS)\bin\dcloffice2k100.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
|
||||
</Excluded_Packages><Source><Source Name="MainSource">UsageTrackerDemo.dpr</Source></Source></Delphi.Personality></BorlandProject></BorlandProject>
|
||||
</ProjectExtensions>
|
||||
<Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" />
|
||||
<ItemGroup>
|
||||
<DelphiCompile Include="UsageTrackerDemo.dpr">
|
||||
<MainSource>MainSource</MainSource>
|
||||
</DelphiCompile>
|
||||
<DCCReference Include="DemoForm.pas">
|
||||
<Form>fDemo</Form>
|
||||
</DCCReference>
|
||||
</ItemGroup>
|
||||
</Project>
|
Reference in New Issue
Block a user