Python.exe process unable to limit it's own committed memory
Closed this issue · 3 comments
Amazing work!
From CMD.EXE I have been able to limit the committed memory of a python.exe process.
Now, python has the ability to execute shell commands through its os
package:
import os
os.system("procgov64 -m 1G -p 21096")
# do other stuff
The PID in the above python code is that of the python process running this same code (I wish to examine the effect of the amount of committed memory on the code runtime-behavior). Unfortunately, executing the above code causes the program to freeze no matter the given memory limit, making me wonder if it is an illegitimate use of Process Governor.
I would be grateful if you could shed more light on this.
I made a slight change to the python program which was successful:
os.popen("procgov64 -m 1G -p 21096")
# do other stuff
Yeah, I was going to propose you to start procgov asynchronously. I also added the --nowait option to the command line (coming in version 2.9).
Thanks. Much appreciated.