From owner-freebsd-hackers Sun Jul 11 17:35:44 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from peach.ocn.ne.jp (peach.ocn.ne.jp [210.145.254.87]) by hub.freebsd.org (Postfix) with ESMTP id F3AE414EB4 for ; Sun, 11 Jul 1999 17:35:39 -0700 (PDT) (envelope-from dcs@newsguy.com) Received: from newsguy.com by peach.ocn.ne.jp (8.9.1a/OCN) id JAA27811; Mon, 12 Jul 1999 09:34:37 +0900 (JST) Message-ID: <3789373D.9B1811F3@newsguy.com> Date: Mon, 12 Jul 1999 09:30:53 +0900 From: "Daniel C. Sobral" X-Mailer: Mozilla 4.6 [en] (Win98; I) X-Accept-Language: pt-BR,ja MIME-Version: 1.0 To: Jon Ribbens Cc: freebsd-hackers@FreeBSD.ORG, tech-userlevel@netbsd.org, tech@openbsd.org Subject: Re: Replacement for grep(1) (part 2) References: <5laet8b2l8.fsf@assaris.sics.se> <5lemij265u.fsf@assaris.sics.se> <3788714D.4E666FFA@newsguy.com> <19990712002043.C7067@oaktree.co.uk> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Jon Ribbens wrote: > > "Daniel C. Sobral" wrote: > > OTOH, though, FreeBSD's malloc() is very unlikely to return an out > > of memory error. > > Why is that? Because memory (as in *real* memory, either RAM or swap) is allocated on-demand. So you can allocate any amount of virtual memory that the system can possibly provide you, even though you'll run out of memory much earlier, because other resources are also consuming it. > What happens if the process hits its resource limits? If the system runs out of memory, the biggest process is killed. It might or might not be the one demanding additional memory. -- Daniel C. Sobral (8-DCS) dcs@newsguy.com dcs@freebsd.org I'm one of those bad things that happen to good people. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message