From owner-freebsd-arch Mon Jan 15 14:17:37 2001 Delivered-To: freebsd-arch@freebsd.org Received: from meow.osd.bsdi.com (meow.osd.bsdi.com [204.216.28.88]) by hub.freebsd.org (Postfix) with ESMTP id 0871B37B401; Mon, 15 Jan 2001 14:17:17 -0800 (PST) Received: from laptop.baldwin.cx (john@jhb-laptop.osd.bsdi.com [204.216.28.241]) by meow.osd.bsdi.com (8.11.1/8.9.3) with ESMTP id f0FMFk194839; Mon, 15 Jan 2001 14:15:46 -0800 (PST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20010115103757.B7240@fw.wintelcom.net> Date: Mon, 15 Jan 2001 14:17:19 -0800 (PST) From: John Baldwin To: Alfred Perlstein Subject: RE: dynamic vs static sysctls? Cc: arch@FreeBSD.org, Hajimu UMEMOTO Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 15-Jan-01 Alfred Perlstein wrote: > [moved to -arch] > > * Hajimu UMEMOTO [010115 10:33] wrote: >> Hi, >> >> >>>>> On Mon, 15 Jan 2001 10:06:18 -0800 >> >>>>> Alfred Perlstein said: >> >> bright> * Hajimu UMEMOTO [010115 10:00] wrote: >> > Hi, >> > >> > I wish to obtain number of processes forked since boot from userland. >> > So, I made a patch to intend to commit. >> > Any comment? >> >> bright> Why not just use a dynamic sysctl for this? >> >> I think dynamic sysctl is useful for dynamic context. But, here is >> just static and it seems there is no advantage. Isn't it? > > Well all the sysctl's I've added have been dynamic, I think the > only reason for the 'static' sysctls is to give sysctl() a > numeric way to get at the sysctls, which isn't very useful > when we have getsysctlbyname(). Actually, he means dynamic as in SYSCTL_ADD_*. I.e., sysctls created at runtime, not compile time like SYSCTL_*. One should use static sysctls if possible as they don't need malloc() at runtime, etc. Dynamic sysctls are good for providing sysctl access to variables that are dynamically generated. -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message