-
Notifications
You must be signed in to change notification settings - Fork 87
Description
Hi there!
Is this code valid on 64 bit?
procedure UpdateVMGraph(var AMemoryMap: TMemoryMapEx);
var
LInd, LIndTop, I1: Cardinal;
LChunkState: TChunkStatusEx;
LMBI: TMemoryBasicInformation;
LA_Char: array[0..MAX_PATH] of Char;
begin
LInd := 0;
repeat
{If the chunk is not allocated by this MM, what is its status?}
if AMemoryMap[LInd] = csExSysAllocated then
begin
{Get all the reserved memory blocks and Windows allocated memory blocks, etc.}
VirtualQuery(Pointer(Cardinal(LInd) * 65536), LMBI, SizeOf(LMBI));
if LMBI.State = MEM_COMMIT then
begin
if (GetModuleFileName(DWord(LMBI.AllocationBase), LA_Char, MAX_PATH) <> 0) then
begin
if DWord(LMBI.AllocationBase) = SysInit.HInstance then
LChunkState := csExSysExe
else
LChunkState := csExSysDLL;
end
Gabriel
:)