Search code examples
pythonwindows-xp

Process size in XP from Python


I have a python script that can approach the 2 GB process limit under Windows XP. On a machine with 2 GB physical memory, that can pretty much lock up the machine, even if the Python script is running at below normal priority.

Is there a way in Python to find out my own process size?

Thanks, Gerry


Solution

  • try:

    import win32process
    print win32process.GetProcessMemoryInfo(win32process.GetCurrentProcess())