Einzelnen Beitrag anzeigen

freimatz

Registriert seit: 20. Mai 2010
1.377 Beiträge
 
Delphi 11 Alexandria
 
#17

AW: Objektliste sprengt RAM (32-bit)

  Alt 15. Jul 2016, 10:10
Ist das Problem noch offen?
Genauer als der ProcessMonitor dürfte es sein, den Speicherverbrauch direkt in deinem Code zu messe. Wir haben da:
Delphi-Quellcode:
function GetApplicationMemory(): Int64;
var
  memoryState: TMemoryManagerState;
  blockState : TSmallBlockTypeState;
begin
  GetMemoryManagerState(memoryState);
  with memoryState do begin
    Result := TotalAllocatedMediumBlockSize + TotalAllocatedLargeBlockSize;
    for blockState in SmallBlockTypeStates do
      Inc(Result, blockState.AllocatedBlockCount * blockState.UseableBlockSize);
  end;
end;
  Mit Zitat antworten Zitat