Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Sep 2000 21:51:05 +0100 (BST)
From:      Doug Rabson <dfr@nlsystems.com>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        Matthew Jacob <mjacob@feral.com>, "Matthew N. Dodd" <mdodd@freebsd.org>, cvs-committers@freebsd.org, cvs-all@freebsd.org
Subject:   Re: cvs commit: src/sys/kern subr_bus.c
Message-ID:  <Pine.BSF.4.21.0009182150270.86297-100000@salmon.nlsystems.com>
In-Reply-To: <Pine.BSF.4.21.0009190145470.17074-100000@besplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 19 Sep 2000, Bruce Evans wrote:

> On Mon, 18 Sep 2000, Matthew Jacob wrote:
> 
> > Yeah, I wondered about that too. I thought
> > 
> > int foo;
> > 
> > and
> > 
> > int foo=0;
> > 
> > were supposed to be the same. Is the kernel now forgetting to clear bss?
> 
> Same for the C abstract machine, which we mostly depend on in the
> kernel (although the kernel is not entirely implementable in C).  Of
> course, it is an implementation detail that the explicit initialization
> puts the variable in the data section instead of in the bss, at least
> for gcc on i386's.
> 
> The bss clearing code hasn't changed for years on  i386's.  I can't see
> where the bss is cleared on alphas (alpha_init is called very early
> in locore.s).

The bss is cleared by the loader for both x86 and alpha. I guess x86
clears it again in locore but it doesn't need to.

-- 
Doug Rabson				Mail:  dfr@nlsystems.com
Nonlinear Systems Ltd.			Phone: +44 20 8348 3944




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0009182150270.86297-100000>