procedure TForm1.Button1Click(Sender: TObject);
var
MemorysStatus: TMemoryStatus;
begin
Memo1.Lines.Clear;
MemorysStatus.dwLength := SizeOf(MemorysStatus);
GlobalMemoryStatus(MemorysStatus);
with MemorysStatus do
begin
Memo1.Lines.Add(IntToStr(dwLength) + ' Size of Memory Status record');
Memo1.Lines.Add(IntToStr(dwMemoryLoad) + '% Memory in use');
Memo1.Lines.Add(IntToStr(dwTotalPhys) + ' Total Physical Memory in Bytes');
Memo1.Lines.Add(IntToStr(dwAvailPhys) + ' Available Physical Memory in Bytes');
Memo1.Lines.Add(IntToStr(dwTotalPageFile) + ' Total Bytes of Paging File');
Memo1.Lines.Add(IntToStr(dwAvailPageFile) + ' Available Bytes in Paging File');
Memo1.Lines.Add(IntToStr(dwTotalVirtual) + ' User Bytes of Address Space');
Memo1.Lines.Add(IntToStr(dwAvailVirtual) + ' Available User Bytes of Address Space');
end;
end