From owner-freebsd-hackers Thu Feb 18 16:27:37 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from alcanet.com.au (border.alcanet.com.au [203.62.196.10]) by hub.freebsd.org (Postfix) with ESMTP id 0B14B1170E for ; Thu, 18 Feb 1999 16:27:19 -0800 (PST) (envelope-from peter.jeremy@auss2.alcatel.com.au) Received: by border.alcanet.com.au id <40325>; Fri, 19 Feb 1999 11:16:41 +1100 Date: Fri, 19 Feb 1999 11:27:11 +1100 From: Peter Jeremy Subject: Re: vm_page_zero_fill To: hackers@FreeBSD.ORG Message-Id: <99Feb19.111641est.40325@border.alcanet.com.au> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Dag-Erling Smorgrav wrote: >If you have a *lot* of global data in your app, you basically have a >choice between a) initializing them in main(), b) spending some CPU >cycles zeroing the BSS at load time, Note that b) _may_ be more efficient that a). The FreeBSD kernel contains several (3 from memory) different bzero algorithms and selects one to suit the CPU (at least in theory). Some processors (eg SuperSPARC) include special bzero instructions which are only available to the kernel. (The downside is that the kernel initialises everything. The programmer may be able to get away with only initialising parts of the BSS). Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message