From owner-freebsd-hackers Sun Dec 17 13:29:20 2000 From owner-freebsd-hackers@FreeBSD.ORG Sun Dec 17 13:29:19 2000 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mta4.rcsntx.swbell.net (mta4.rcsntx.swbell.net [151.164.30.28]) by hub.freebsd.org (Postfix) with ESMTP id 506F437B400 for ; Sun, 17 Dec 2000 13:29:19 -0800 (PST) Received: from holly.dyndns.org ([208.191.149.190]) by mta4.rcsntx.swbell.net (Sun Internet Mail Server sims.3.5.2000.01.05.12.18.p9) with ESMTP id <0G5Q00ARHEBNSQ@mta4.rcsntx.swbell.net> for hackers@FreeBSD.ORG; Sun, 17 Dec 2000 15:28:35 -0600 (CST) Received: (from chris@localhost) by holly.dyndns.org (8.9.3/8.9.3) id PAA56894; Sun, 17 Dec 2000 15:27:53 -0600 (CST envelope-from chris) Date: Sun, 17 Dec 2000 15:27:52 -0600 From: Chris Costello Subject: Re: Why not another style thread? (was Re: cvs commit: src/lib/libc/gen getgrent.c) In-reply-to: To: Bosko Milekic Cc: "Jacques A. Vidrine" , hackers@FreeBSD.ORG Reply-To: chris@calldei.com Message-id: <20001217152752.E54486@holly.calldei.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii User-Agent: Mutt/0.96.4i References: <20001217151735.D54486@holly.calldei.com> Sender: chris@holly.dyndns.org Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sunday, December 17, 2000, Bosko Milekic wrote: > Agreed. However, in the kernel, all free()s should be made as in (1), > in my opinion. (2) is dangerous, and (3) would just obfuscate the code. > (I know this does not apply to the commit, but should be noted) Yes, I agree; however free() in the kernel is an entirely different case and is not governed by the C standard. If you ask anyone in comp.lang.c, they'll tell you that our kernel is only written in a language _similar_ to C, and I can understand that, because many standard C functions behave differently in the kernel. (malloc and free come to mind, obviously.) -- +-------------------+------------------------+ | Chris Costello | Don't stop at one bug. | | chris@calldei.com | | +-------------------+------------------------+ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message