Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 287
Gerry Avatar asked Oct 27 '22 07:10

Gerry


1 Answers

try:

import win32process
print win32process.GetProcessMemoryInfo(win32process.GetCurrentProcess())
like image 157
Igal Serban Avatar answered Oct 31 '22 11:10

Igal Serban