From owner-freebsd-current Tue Dec 9 09:40:29 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id JAA18457 for current-outgoing; Tue, 9 Dec 1997 09:40:29 -0800 (PST) (envelope-from owner-freebsd-current) Received: from crh.cl.msu.edu (crh.cl.msu.edu [35.8.1.24]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id JAA18448 for ; Tue, 9 Dec 1997 09:40:22 -0800 (PST) (envelope-from henrich@crh.cl.msu.edu) Received: (from henrich@localhost) by crh.cl.msu.edu (8.8.7/8.8.7) id MAA05374; Tue, 9 Dec 1997 12:40:16 -0500 (EST) (envelope-from henrich) Message-ID: <19971209124016.19617@crh.cl.msu.edu> Date: Tue, 9 Dec 1997 12:40:16 -0500 From: Charles Henrich To: Poul-Henning Kamp Cc: perhaps@yes.no, freebsd-current@FreeBSD.ORG Subject: Re: VM system info References: <199712091643.LAA04851@crh.cl.msu.edu> <772.881687925@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.84 In-Reply-To: <772.881687925@critter.freebsd.dk>; from Poul-Henning Kamp on Tue, Dec 09, 1997 at 06:18:45PM +0100 X-Operating-System: FreeBSD 2.2.5-RELEASE X-PGP-Fingerprint: 1024/F7 FD C7 3A F5 6A 23 BF 76 C4 B8 C9 6E 41 A4 4F Sender: owner-freebsd-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On the subject of Re: VM system info, Poul-Henning Kamp stated: > >>(5) Code prerequisites is documented through assert() or similar > >>functionality. > > > >Egads! I wish assert() was thrown down to the pits of hell. Its a > >programmers cop out. In almost no circumstance does one ever need to > >assert . If you find an error condition, COPE as best you can! Especially > >in the kernel. > > Well, suffice to say that I disagree more than words can express. > > In particular in a kernel should assert be used to guard against "bad news", > but lets just remember that an assert can be as stealthy as a syslog entry > or as intrusive as a panic. It all depends exactly how bad. I am referring to the assert() function which says if this fails, panic.. Thats (in most cases) not a good approach. Now I agree that one should test all conditions all the time to make sure the actions your about to take are sane. -Crh Charles Henrich Michigan State University henrich@msu.edu http://pilot.msu.edu/~henrich