Category: System Information
Title: Get the total and available memory
Date added: 15.03.2006
Hits: 3602
procedure TForm1.Button1Click(Sender: TObject);
var
memory: TMemoryStatus;
begin
memory.dwLength := SizeOf(memory);
GlobalMemoryStatus(memory);
ShowMessage('Total memory: ' +
IntToStr(memory.dwTotalPhys) + ' Bytes');
ShowMessage('Available memory: ' +
IntToStr(memory.dwAvailPhys) + ' Bytes');
end;