Re: Limit the memory for a child process
- From: "Lenard Gunda" <arthur.darkholme@xxxxxxxxxx>
- Date: Mon, 2 May 2005 22:45:18 +0200
I have actually tried that function. I call it on the handle returned by
CreateProcess, before I start the child process. However, it does not seem
to limit. I have written a test, which tries to allocate more memory than
specified in the limit for SetProcessWorkingSetSize, and the process
allocates it without problem.
I also fill the memory with garbage, so it really does get allocated.
-Lenard
"Bonj" <a@xxxxx> wrote in message
news:u31DLZ1TFHA.3392@xxxxxxxxxxxxxxxxxxxxxxx
> Check out the function SetProcessWorkingSetSize.
>
> "Lenard Gunda" <arthur.darkholme@xxxxxxxxxx> wrote in message
> news:%23wNRQY1TFHA.2172@xxxxxxxxxxxxxxxxxxxxxxx
>> Hi
>>
>> I am writing a system that needs to start other applications, and needs
>> to evaluate those applications. However, I would like to be able to
>> restrict the amount of memory these child processes can consume.
>>
>> What I need is: before or after the process is created, I would like to
>> set a memory limit (like 16Mb, 64Mb, etc) on the child process. The child
>> process should not be able to consume (allocate) more memory, be it real
>> or virtual, than this limit.
>>
>> Is this possible in any way?
>>
>> Thank you
>>
>> -Lenard
>>
>
>
.
- Follow-Ups:
- Re: Limit the memory for a child process
- From: Pavel Lebedinsky
- Re: Limit the memory for a child process
- References:
- Limit the memory for a child process
- From: Lenard Gunda
- Re: Limit the memory for a child process
- From: Bonj
- Limit the memory for a child process
- Prev by Date: Re: Limit the memory for a child process
- Next by Date: Re: Limit the memory for a child process
- Previous by thread: Re: Limit the memory for a child process
- Next by thread: Re: Limit the memory for a child process
- Index(es):
Relevant Pages
|