From owner-freebsd-hackers Thu Oct 8 09:10:40 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA25251 for freebsd-hackers-outgoing; Thu, 8 Oct 1998 09:10:40 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from bingsun1.cc.binghamton.edu (bingsun1.cc.binghamton.edu [128.226.1.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA25238 for ; Thu, 8 Oct 1998 09:10:35 -0700 (PDT) (envelope-from bf20761@binghamton.edu) Received: from localhost (bf20761@localhost) by bingsun1.cc.binghamton.edu (8.8.7/8.6.9) with SMTP id MAA04127 for ; Thu, 8 Oct 1998 12:10:23 -0400 (EDT) Date: Thu, 8 Oct 1998 12:10:23 -0400 (EDT) From: zhihuizhang X-Sender: bf20761@bingsun1 To: hackers Subject: Question on buffer's use count Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I am reading the source code in vfs_bio.c. I find that the use count of a new buffer is set to be 4 (instead of 1) in getnewbuf(). In getblk(), we increment the count at least twice if the buffer is in core and busy. Can anyone explain this stuff to me. Thanks for your help. -------------------------------------------------- | Zhihui Zhang, http://cs.binghamton.edu/~zzhang | | Dept. of Computer Science, SUNY at Binghamton | -------------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message