On Sun, 23 Jul 2000, Karl J. Runge wrote:
> I've always wondered how I could limit the amount of Memory (or VM)
> for a process. E.g. give netscape 80MB max.
>
> I have tried ulimit -m N and similar flags in a wrapper script
> for netscape. But it doesn't work as I want: netscape will grow
> until it reaches the limit and then die due to lack of memory.
I'm afraid that is all you are going to get.
> I want the kernel to somehow masquerade to the process that the machine
> has less VM than it really does, thereby hopefully inducing netscape to
> free(3) more often...
Not gonna happen. Programs call free() when they're done using a block of
memory; not before, and not after. Actually, in Netscape's case, it often
doesn't call free() even after it's done using the memory. :-( You might
find a program that will call internal garbage collection routines when a
malloc() fails, but if Netscape was that smart, the ulimit fix would have
worked.
The problem is Netscape's memory management is horrid. To paraphrase a
certain kernel developer, it should be shown to small children when they've
been especially bad. :-) The only solution is to fix Netscape. Hopefully
Mozilla will do that.
--
Ben Scott <[EMAIL PROTECTED]>
Net Technologies, Inc. <http://www.ntisys.com>
Voice: (800)905-3049 x18 Fax: (978)499-7839
**********************************************************
To unsubscribe from this list, send mail to
[EMAIL PROTECTED] with the following text in the
*body* (*not* the subject line) of the letter:
unsubscribe gnhlug
**********************************************************