Virtual Memory Info

unit VMUnit;
interface
uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, ExtCtrls, ComCtrls;
type
  TForm1 = class(TForm)
    Label1: TLabel;
    TabControl1: TTabControl;
    Panel1: TPanel;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    Label5: TLabel;
    Label6: TLabel;
    Label7: TLabel;
    Label8: TLabel;
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;
var
  Form1        : TForm1;
  MemoryStatus : TMemoryStatus;
implementation
{$R *.DFM}
procedure TForm1.FormCreate(Sender: TObject);
begin
 MemoryStatus.dwLength := SizeOf(MemoryStatus);
 GlobalMemoryStatus(MemoryStatus);
With MemoryStatus do
 Begin
 dwTotalPhys := dwTotalPhys DIV 1024;
{}
 Label2.Caption := 'Memory load       : ' + IntToStr(dwMemoryLoad);
 Label3.Caption := 'Total phys        : ' + IntToStr(dwTotalPhys);
 Label4.Caption := 'Avail phys        : ' + IntToStr(dwAvailPhys);
 Label5.Caption := 'Total Page File   : ' + IntToStr(dwTotalPageFile);
 Label6.Caption := 'Avail Page File   : ' + IntToStr(dwAvailPageFile);
 Label7.Caption := 'Total Virtual     : ' + IntToStr(dwTotalVirtual);
 Label8.Caption := 'Avail Virtual     : ' + IntToStr(dwAvailVirtual);
 End;
end;
end.