To retrieve the current memory status, you can use the GlobalMemoryStatus() function. The TMemoryStatus contains several fields indicating the status of the memory: .dwMemoryLoad: Total memory used in percentage (%)
. .dwTotalPhys: Total physical memory in bytes.
.dwAvailPhys: Physical memory left in bytes.
.dwTotalPageFile: Total page file in bytes.
.dwAvailPageFile

age file left in bytes.
.dwTotalVirtual: Total virtual memory in bytes.
.dwAvailVirtual: Virtual memory left in bytes.
Before presenting the memory values, convert them into giga, mega or kilobytes.
var
Status : TMemoryStatus;
begin
Status.dwLength := sizeof( TMemoryStatus ) ;
GlobalMemoryStatus( Status ) ;
and using systeminfo
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;
try to understand this and i'm suggesting you to start reading about API and WinApi.
best regards,