Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Feb 1998 22:34:52 +0100
From:      Eivind Eklund <eivind@yes.no>
To:        Pierre Beyssac <pb@fasterix.freenix.org>
Cc:        Eivind Eklund <eivind@yes.no>, current@FreeBSD.ORG
Subject:   Re: Heads up: static -ification
Message-ID:  <19980209223452.41056@follo.net>
In-Reply-To: <19980209210343.OU10756@@>; from Pierre Beyssac on Mon, Feb 09, 1998 at 09:03:44PM %2B0100
References:  <19980209064733.56080@follo.net> <19980209210343.OU10756@@>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Feb 09, 1998 at 09:03:44PM +0100, Pierre Beyssac wrote:
> Eivind Eklund writes:
> > I'm just about to commit a change that staticize close to everything that
> > can be staticized and doesn't look unreasonable to staticize (almost 400
> > variables and functions).
> 
> Just out of curiosity, what's the rationale for this? Smaller stack
> footprint? Faster access to said variables?

There are a multitude of reasons; I'll list some of them:

* The namespace was badly managed.  E.g, a single driver had taken the
  global name 'devfs_token'.

* Localization of state - to allow the programmer to see that his
  changes don't affect anything beyond that file.

* Localization of state - to let the compiler do better optimizing.

* Detection of unused variables.

* Data hiding - this make better module boundaries, and make more
  certain that incestous relationships don't develop.  It will make it
  easier to change the code later.

Eivind.

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



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