Mega Code Archive

 
Categories / Delphi / System
 

Get the total and available memory

Title: get the total and available memory? procedure TForm1.Button1Click(Sender: TObject); var memory: TMemoryStatus; begin memory.dwLength := SizeOf(memory); GlobalMemoryStatus(memory); ShowMessage('Total Arbeitsspeicher/Total memory: ' + IntToStr(memory.dwTotalPhys) + ' Bytes'); ShowMessage('Freier Arbeitsspeicher/Available memory: ' + IntToStr(memory.dwAvailPhys) + ' Bytes'); end;