From owner-freebsd-hackers Mon Jul 12 17:55:29 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 C3E5E15270 for ; Mon, 12 Jul 1999 17:55:21 -0700 (PDT) (envelope-from dcs@newsguy.com) Received: from newsguy.com by peach.ocn.ne.jp (8.9.1a/OCN) id JAA02136; Tue, 13 Jul 1999 09:54:06 +0900 (JST) Message-ID: <378A8D4C.AFDCCD66@newsguy.com> Date: Tue, 13 Jul 1999 09:50:21 +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> <3789373D.9B1811F3@newsguy.com> <19990712022424.A1390@oaktree.co.uk> <37899FA7.4DC4E088@newsguy.com> <19990712235629.A2152@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: > > That's *not* abomination. How about pre-allocating over 100 Mb for X > > Free, for instance? > > What about it? If an application does not need 100MB, it should not > malloc it. If it does need it, it should malloc it and know that it > is available if the malloc succeeds. Well, learn something about real programs first, and then come back. > > Basically, if you don't have enough memory, you just don't have enough > > memory. > > Yes, and the application should be told this via the standard > documented interface for doing so, i.e. returning NULL from > malloc(). This results in the applications working with less memory than would actually be possible through overcommit. > > What FreeBSD does *reduces* the need for memory. If FreeBSD *did > > not* do it, then you'd need much more memory. > > Why? Are there really such a lot of applications allocating vastly > more memory than they actually use? Right. -- 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