Date: Tue, 13 Jan 1998 00:19:24 +0000 From: Chrisy Luke <chrisy@flix.net> To: Tom <tom@sdf.com> Cc: joelh@gnu.org, freebsd-hackers@FreeBSD.ORG Subject: Re: sharable static arrays? Message-ID: <19980113001924.03000@flix.net> In-Reply-To: <Pine.BSF.3.95q.980112113916.9226D-100000@misery.sdf.com>; from Tom on Mon, Jan 12, 1998 at 11:40:22AM -0800 References: <19980112194053.29382@flix.net> <Pine.BSF.3.95q.980112113916.9226D-100000@misery.sdf.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Tom wrote (on Jan 12): > Assuming you want changes visable to other invocations. Many times you > do not. But since he asked about static data, I assume that changes would > not be made. That may be so, but C's interpretation of "static" means that data doesn't lose its value/contents when it is out of scope. It achieves this by determining (albeit relative to the start of a segment of some nature) its location as compile/link time. Assigned strings are "const static" data by default, unless -fwriteable-strings is applied, when they are merely static (and most non-unix C startup code then fills the value in from a const area as it does for all variables defined static at all levels of scope - unix does it in the image loader by page mapping it). Normal static data should not be in a shared segment since it's local working data. const data could/should be shared since it's value is, by definition, constant. There's probably as problem if its value is not known at compile time, but it's not my problem... Chris. -- == chris@easynet.net, chrisy@flix.net, chrisy@flirble.org. == Head of Systems for Easynet Group PLC.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980113001924.03000>