How to automaticly close process that uses more that specified amount of memory on windows
How to automatically close process that uses more that specified amount of memory on Windows? Is it possible to specify some amount of memory (for example 1MB) and to run some executable file with those parameters? If the process tries to allocate more than that amount of memory it should close and return some error value.开发者_JS百科 Is there an easy way to do something like that on Windows? Excuse my English.
You can use this SO answer to get memory performance stats and TerminateProcess to kill it.
精彩评论