Back to index

enigmail  1.4.3
Classes | Functions | Variables
build.win32.procmem Namespace Reference

Classes

class  VM_COUNTERS

Functions

def get_vmsize

Variables

int PROCESS_QUERY_INFORMATION = 0x0400
tuple handle

Function Documentation

Return (peak_virtual_size, virtual_size) for the process |handle|.

Definition at line 55 of file procmem.py.

00055 
00056 def get_vmsize(handle):
00057     """
00058     Return (peak_virtual_size, virtual_size) for the process |handle|.
00059     """
00060     ProcessVmCounters = 3
00061     vmc = VM_COUNTERS()
00062     if ctypes.windll.ntdll.NtQueryInformationProcess(int(handle),
00063                                                      ProcessVmCounters,
00064                                                      ctypes.byref(vmc),
00065                                                      ctypes.sizeof(vmc),
00066                                                      None) == 0:
00067        return (vmc.PeakVirtualSize, vmc.VirtualSize)
00068 
00069     return (-1, -1)


Variable Documentation

Initial value:
00001 ctypes.windll.kernel32.OpenProcess(PROCESS_QUERY_INFORMATION,
00002                                                     0, # no inherit
00003                                                     int(pid))

Definition at line 73 of file procmem.py.

Definition at line 71 of file procmem.py.