memory amount

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Laksen
Member
Member
Posts: 140
Joined: Fri Nov 09, 2007 3:30 am
Location: Aalborg, Denmark

Post by Laksen »

This is how I parse the entries. No risk of overflow

Code: Select all

 PMemoryMap = ^TMemoryMap;
 TMemoryMap = packed record
  size: cardinal;
  base: qword;
  length: qword;
  mtype: cardinal;
 end;
...
var a: PMemoryMap;
   a := MbInfo.MemoryMap;
   for i := 0 to (MbInfo.MemoryMapSize div SizeOf(TMemoryMap))-1 do
   begin
      writeln(a^.Base,'->',a^.length);
      inc(a);
   end;
marcio
Posts: 14
Joined: Fri Oct 20, 2006 10:54 am

Post by marcio »

It works now, thanks guys!
Post Reply