From owner-freebsd-hackers Mon Jan 12 11:33:50 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.7/8.8.7) id LAA17253 for hackers-outgoing; Mon, 12 Jan 1998 11:33:50 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from misery.sdf.com (misery.sdf.com [204.244.210.193]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id LAA17215 for ; Mon, 12 Jan 1998 11:33:28 -0800 (PST) (envelope-from tom@sdf.com) Received: from tom by misery.sdf.com with smtp (Exim 1.73 #1) id 0xrpMS-0002Pr-00; Mon, 12 Jan 1998 11:17:24 -0800 Date: Mon, 12 Jan 1998 11:16:48 -0800 (PST) From: Tom To: Chrisy Luke cc: joelh@gnu.org, freebsd-hackers@FreeBSD.ORG Subject: Re: sharable static arrays? In-Reply-To: <19980112112455.48744@flix.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk On Mon, 12 Jan 1998, Chrisy Luke wrote: > Joel Ray Holveck wrote (on Jan 12): > > Are static arrays shared across multiple invocations of a program? > > Not intrinsicly. You'll have to either use SYS-V style shared > memory (options SYSVSHM SYSVSEM SYSVMSG in a kernel config and > shmget(2) etc) or use BSD style mapped memory (mmap(2)). Remember these are _static_ arrays, which mean they are directly coded into C. And yes, they should be shared across multiple invocations, although it can be difficult to see this. COW is used heavily, so even things that can change aften often shared, up to the point they are changed. > Chris. > -- > == chris@easynet.net, chrisy@flix.net, chrisy@flirble.org. > == Head of Systems for Easynet Group PLC. Tom