![]() |
Belegung des internen FastMM abfragen?
Ich versuche mal wieder über
![]() Aktuell bin ich hier, aber in meinem Projekt fehlen einige hundert MB. :shock: (vorhin hatte ich sogar mal -500 MB :lol: )
Delphi-Quellcode:
Das alte
Function GetMemoryLoad: Cardinal;
Var MS: TMemoryManagerState; i: Integer; Begin GetMemoryManagerState(MS); Result := MS.TotalAllocatedLargeBlockSize + (MS.TotalAllocatedMediumBlockSize - MS.ReservedMediumBlockAddressSpace); For i := 0 to NumSmallBlockTypes - 1 do Result := Result - MS.SmallBlockTypeStates[i].ReservedAddressSpace + (MS.SmallBlockTypeStates[i].UseableBlockSize * MS.SmallBlockTypeStates[i].AllocatedBlockCount); End; ![]() aber es ist halt alt (deprecated). TStringList befindet sich eine 100 MB Textdatei (Ansi), also 200 MB an Daten (Unicode eben) und dennoch werden grade Mal 50 MB angezeigt. Wogegen der TaskManager sogar von 485 MB spricht, welches auch von GetHeapStatus in etwa bestätigt wird. Wie berechnet man es also richtig? (wobei es schon blöde ist, daß es in Zukunft keine nette "Übersicht" ala GetHeapStatus geben soll) |
Re: Belegung des internen FastMM abfragen?
Zitat:
Zur Verfügung steht Sum(Reserved*) - Sum(*Allocated* + [].Count * [].UsableBlockSize). So würde ich es mal ausprobieren. Grüsse, Dirk {Edit: [].Count * [].Size} |
Alle Zeitangaben in WEZ +1. Es ist jetzt 01:55 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz