From owner-freebsd-hackers Mon Jan 12 16:19:42 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.7/8.8.7) id QAA25079 for hackers-outgoing; Mon, 12 Jan 1998 16:19:42 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from omega.noc.easynet.net (omega.noc.easynet.net [193.131.248.227]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id QAA25044 for ; Mon, 12 Jan 1998 16:19:15 -0800 (PST) (envelope-from chrisy@omega.noc.easynet.net) Received: (qmail 2179 invoked by uid 1001); 13 Jan 1998 00:19:25 -0000 Message-ID: <19980113001924.03000@flix.net> Date: Tue, 13 Jan 1998 00:19:24 +0000 From: Chrisy Luke To: Tom Cc: joelh@gnu.org, freebsd-hackers@FreeBSD.ORG Subject: Re: sharable static arrays? References: <19980112194053.29382@flix.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.88 In-Reply-To: ; from Tom on Mon, Jan 12, 1998 at 11:40:22AM -0800 Organization: The Flirble Internet Exchange X-URL: http://www.flix.net/ X-MOD1: X X-MOD2: X X-Fortune: Loose bits sink chips. X-FTP: ftp://ftp.flirble.org/ Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk 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.