You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using this demo with the Default MM of Delphi 10.2, (Removed the FasMM from the uses clauses), I noticed that the logic for calculating total allocated pages is using integer division. In my use case, the LMBI.RegionSize is NOT an interval of PageSize, so the integer division "misses" the last page, causing it to sit in an infinite loop.
FastMM4/Demos/Usage Tracker/FastMMUsageTracker.pas
Line 525 in bed3021
When using this demo with the Default MM of Delphi 10.2, (Removed the FasMM from the uses clauses), I noticed that the logic for calculating total allocated pages is using integer division. In my use case, the LMBI.RegionSize is NOT an interval of PageSize, so the integer division "misses" the last page, causing it to sit in an infinite loop.
Changing that line to
LIndTop := Ceil((Cardinal(LMBI.BaseAddress) + Cardinal(LMBI.RegionSize)) / 65536);
And adding Math to the uses clause fixed my issue.
The text was updated successfully, but these errors were encountered: