From owner-freebsd-hackers Tue Jul 13 14:32: 4 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [209.157.86.2]) by hub.freebsd.org (Postfix) with ESMTP id E6A5314DD2 for ; Tue, 13 Jul 1999 14:32:01 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id OAA80991; Tue, 13 Jul 1999 14:31:38 -0700 (PDT) (envelope-from dillon) Date: Tue, 13 Jul 1999 14:31:38 -0700 (PDT) From: Matthew Dillon Message-Id: <199907132131.OAA80991@apollo.backplane.com> To: Archie Cobbs Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Replacement for grep(1) (part 2) References: <199907132125.OAA72872@bubba.whistle.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :> ram and 512MB of swap (4MB of swap in use), but the kernel reports over :> 3 GB of VM assigned to processes. That's a fairly lightly loaded machine. : :What you say is generally true; however, the problem is that *you* :are making implicit assumptions about what applications *I* might :have in mind. I just think that's a presumptous thing to do unless :you can read minds.. : :For example: : :- I might be creating a very limited embedded system with just a few : small processes that are all written to *handle* out of memory situations. Really? Then setting resource limits from within each program is not a problem now is it? Then it will get a nice malloc failure instead of getting killed by the kernel. :- I could be creating a "Java OS" that is going to have a single process, : ie, the Java VM, that can handle ENOMEM (which translates into an : OutOfMemoryException, which can be caught) but otherwise *must not die*. .... just one process? Set a resource limit! If you have 64MB of swap, then limit the size of the Java OS process to 50MB. Now the java process will get a nice malloc failure instead of getting killed by the kernel. :... :-Archie -Matt Matthew Dillon :___________________________________________________________________________ :Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com : : :To Unsubscribe: send mail to majordomo@FreeBSD.org :with "unsubscribe freebsd-hackers" in the body of the message : To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message