Fórum Total de memória consumida #270675
02/03/2005
0
Eu preciso mostrar em um label o total de bytes ou kbytes que o meu programa está consumindo.
obrigado
Biffi
Curtir tópico
+ 0Posts
03/03/2005
Rômulo Barros
procedure TfrmSobreDetalhes.FormCreate(Sender: TObject); const cBytesPorMb = 1024 * 1024; var M: TMemoryStatus; begin M.dwLength := SizeOf(M); GlobalMemoryStatus(M); Memo1.Clear; with Memo1.Lines do begin Add(´´); Add(Format(´Memória em uso: ¬d¬¬´, [M.dwMemoryLoad])); Add(Format(´Total de memória física: ¬f MB´, [M.dwTotalPhys / cBytesPorMb])); Add(Format(´Memória física disponível: ¬f MB´, [M.dwAvailPhys / cBytesPorMb])); Add(Format(´Tamanho máximo do arquivo de paginação: ¬f MB´, [M.dwTotalPageFile / cBytesPorMb])); Add(Format(´Disponível no arquivo de paginação: ¬f MB´, [M.dwAvailPageFile / cBytesPorMb])); Add(Format(´Total de memória virtual: ¬f MB´, [M.dwTotalVirtual / cBytesPorMb])); Add(Format(´Memória virtual disponível: ¬f MB´, [M.dwAvailVirtual / cBytesPorMb])); end; end;
Gostei + 0
03/03/2005
Cabelo
Gostei + 0
03/03/2005
Salsa
Gostei + 0
03/03/2005
Rômulo Barros
[color=red:b0cd16964e][u:b0cd16964e]Vê aew... tou um pouco sem tempo:[/u:b0cd16964e][/color:b0cd16964e]
Uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, Buttons, ExtCtrls;
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)