hi,
to control the amount of memory allocated to a process, unix uses
system parameters. here are the following which pertain to the
question mentioned by shridhar:
maxdsiz -> defines the maximum size of the data segments of an
executing process
maxssiz -> defines the maximum size of the stack segment of an
executing process
maxtsiz -> defines the maximum size of the shared text segment of
an executing process
NOTE: the values are by default so large that the system is able
to run any *large* program.
in general the following formula is applicable:
process data + process stack + process text <= 4094 MB
u can modify the above using sysctl. c manpage of sysctl to
proceed further. hope this helps...
best,
-Piyush
______________________________ Reply Separator _________________________________
Subject: Re: [LIH] How can I restrict memmory allocated to program
Author: sojan ([EMAIL PROTECTED]) at internet
Date: 10/10/00 5:48 PM
Hi,
It might not be forking. freeamp might be a multithreaded
app....and the processess you see are the different threads.
readup Posix threads on linux.
What about memory access restrictions?...anyone?
Soj.
On Tue, 10 Oct 2000, Shridhar Daithankar wrote:
> Hi all
>
> I have a small problem. I want to restrict maximum memory allocated to a
> program. I don't want any damn program to eat as much memory as it can get
> allocated. Particularly after I tried Opera, which fills memory like water fil
ls
> road in rainy season. On a 64 MB/256MB Swap machine, I don't want a message
> 'Fork() not enough memory' when I issue kill of ps on command prompt.
>
> Secondly if anybody has used freeamp, it forks itself around 10 times and hogs
> all the memory. I searched code for fork(). Only place it has fork() is when y
ou
> open a site using a browser etc. It does not fork in normal situation. Is ther
e
> any other way of creating child processes?
>
> Bye
> Shridhar
>
>
> ----------------------------------------------
> LIH is all for free speech. But it was created
> for a purpose. Violations of the rules of
> this list will result in stern action.
>
----------------------------------------------
The mailing list archives are available at
http://lists.linux-india.org/cgi-bin/wilma/LIH
----------------------------------------------
The mailing list archives are available at
http://lists.linux-india.org/cgi-bin/wilma/LIH