'TMemoryStatus'에 해당되는 글 1건
- 2007/09/20 Get system info (free memory, etc)
procedure TForm1.Button1Click(Sender: TObject) ;
var MemoryStatus:TMemoryStatus;
begin
Memo1.Lines.Clear;
MemoryStatus.dwLength := SizeOf(MemoryStatus) ;
GlobalMemoryStatus(MemoryStatus) ;
with MemoryStatus do begin
Memo1.Lines.Add(IntToStr(dwLength) +
' Size of ''MemoryStatus'' 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;
var MemoryStatus:TMemoryStatus;
begin
Memo1.Lines.Clear;
MemoryStatus.dwLength := SizeOf(MemoryStatus) ;
GlobalMemoryStatus(MemoryStatus) ;
with MemoryStatus do begin
Memo1.Lines.Add(IntToStr(dwLength) +
' Size of ''MemoryStatus'' 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;

Prev

Rss Feed