Skip to content

Commit

Permalink
Merge pull request pleriche#71 from jpluimers/pleriche-FastMM4-issues-67
Browse files Browse the repository at this point in the history
makes UseTrackerDemo uses FastMM4.pas in repository, then fixes pleriche#67
  • Loading branch information
pleriche authored May 26, 2019
2 parents bed3021 + ad10691 commit 4c09125
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion Demos/Usage Tracker/UsageTrackerDemo.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
<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>
Expand Down Expand Up @@ -64,4 +66,4 @@
<Form>fDemo</Form>
</DCCReference>
</ItemGroup>
</Project>
</Project>
6 changes: 3 additions & 3 deletions FastMM4.pas
Original file line number Diff line number Diff line change
Expand Up @@ -1462,11 +1462,11 @@ procedure LogReleaseStackUsage;
{The pattern used to fill unused memory}
DebugFillByte = $80;
{$ifdef 32Bit}
DebugFillPattern = $01010101 * Cardinal(DebugFillByte);
DebugFillPattern = $01010101 * Cardinal(DebugFillByte); // Default value $80808080
{The address that is reserved so that accesses to the address of the fill
pattern will result in an A/V. (Not used under 64-bit, since the upper half
of the address space is always reserved by the OS.)}
DebugReservedAddress = $01010000 * Cardinal(DebugFillByte);
DebugReservedAddress = $01010000 * Cardinal(DebugFillByte); // Default value $80800000
{$else}
DebugFillPattern = $8080808080808080;
{$endif}
Expand Down Expand Up @@ -12627,7 +12627,7 @@ procedure InstallMemoryManager;
begin
{$ifdef FullDebugMode}
{$ifdef 32Bit}
{Try to reserve the 64K block covering address $80808080}
{Try to reserve the 64K block covering address $80808080 so pointers with DebugFillPattern will A/V}
ReservedBlock := VirtualAlloc(Pointer(DebugReservedAddress), 65536, MEM_RESERVE, PAGE_NOACCESS);
{Allocate the address space slack.}
AddressSpaceSlackPtr := VirtualAlloc(nil, FullDebugModeAddressSpaceSlack, MEM_RESERVE or MEM_TOP_DOWN, PAGE_NOACCESS);
Expand Down

0 comments on commit 4c09125

Please sign in to comment.