|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Memory limit for a new processHi,
I was trying to write an application which would start a new process. But the problem is, I want to put a limit on the size of stack and heap for the process. In case the given limit is exceeded, I would like the process to terminate. I guess, I should try using System.Diagnostics.Process class. There is MaxWorkingSet property, but I am not sure, if that is what I need. And again, it can only be set after the process is started -- not the thing I need. Any ideas? Regards, Mantas why?
-- Show quoteRegards, Alvin Bruney [MVP ASP.NET] [Shameless Author plug] The Microsoft Office Web Components Black Book with .NET Now Available @ www.lulu.com/owc Forth-coming VSTO.NET - Wrox/Wiley 2006 ------------------------------------------------------- "Mantas" <Man***@discussions.microsoft.com> wrote in message news:FB592364-DA7F-4C58-A615-969FB616246D@microsoft.com... > Hi, > > I was trying to write an application which would start a new process. But > the problem is, I want to put a limit on the size of stack and heap for the > process. In case the given limit is exceeded, I would like the process to > terminate. > > I guess, I should try using System.Diagnostics.Process class. There is > MaxWorkingSet property, but I am not sure, if that is what I need. And again, > it can only be set after the process is started -- not the thing I need. > > Any ideas? > > Regards, > Mantas Well, it is sort of a testing system, or a judge, if you will. If you are
familiar with different programming competition, where your program gets a set of input and must give a correct output, you should have a clear picture of the purpose of my program. Anyway, I have figured out that Process.PeakPagedMemorySize works more or less the way I expect. But how do I get the value of this property, if my process lasts for only 0.2 sec, or probably less? The same problem with determening start time of the process. Regards, Mantas Show quote "Alvin Bruney - ASP.NET MVP" wrote: > why? > > -- > Regards, > Alvin Bruney [MVP ASP.NET] > > [Shameless Author plug] > The Microsoft Office Web Components Black Book with .NET > Now Available @ www.lulu.com/owc > Forth-coming VSTO.NET - Wrox/Wiley 2006 > ------------------------------------------------------- > > > > "Mantas" <Man***@discussions.microsoft.com> wrote in message > news:FB592364-DA7F-4C58-A615-969FB616246D@microsoft.com... > > Hi, > > > > I was trying to write an application which would start a new process. But > > the problem is, I want to put a limit on the size of stack and heap for > the > > process. In case the given limit is exceeded, I would like the process to > > terminate. > > > > I guess, I should try using System.Diagnostics.Process class. There is > > MaxWorkingSet property, but I am not sure, if that is what I need. And > again, > > it can only be set after the process is started -- not the thing I need. > > > > Any ideas? > > > > Regards, > > Mantas > > > |
|||||||||||||||||||||||