From owner-freebsd-hackers Tue Jan 13 18:55:44 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id SAA24797 for hackers-outgoing; Tue, 13 Jan 1998 18:55:44 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from wcc.wcc.net (wcc.wcc.net [208.6.232.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id SAA19075 for ; Tue, 13 Jan 1998 18:07:23 -0800 (PST) (envelope-from piquan@wcc.wcc.net) Received: from detlev.UUCP (ppp68.wcc.net [208.6.232.68]) by wcc.wcc.net (8.8.7/8.8.7) with ESMTP id UAA07552; Tue, 13 Jan 1998 20:00:20 -0600 (CST) Received: (from joelh@localhost) by detlev.UUCP (8.8.8/8.8.7) id UAA03069; Tue, 13 Jan 1998 20:03:37 -0600 (CST) (envelope-from joelh) Date: Tue, 13 Jan 1998 20:03:37 -0600 (CST) Message-Id: <199801140203.UAA03069@detlev.UUCP> To: tlambert@primenet.com CC: tlambert@primenet.com, chrisy@flix.net, freebsd-hackers@FreeBSD.ORG In-reply-to: <199801131946.MAA14965@usr01.primenet.com> (message from Terry Lambert on Tue, 13 Jan 1998 19:46:43 +0000 (GMT)) Subject: Re: sharable static arrays? From: Joel Ray Holveck Reply-to: joelh@gnu.org References: <199801131946.MAA14965@usr01.primenet.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk >>> Ideally, all static data should be mapped copy-on-write. I don't >>> think it's mapped, at this point; it probably needs a seperate ELF >>> section from the rest of data, to (1) force it to a page boundry >>> for it's mapping and (2) allow it to have seperate section flags to >>> indicate it should be treated as copy-on-write. >> Is it possible with a.out? (Yes, I know, I should learn more about >> the object file formats, does anybody have good pointers?) > Sean pointed out that he thinks the original poster wanted shared > memory that could be declared in a program. What we used to call > a "Monitor Common Block" back in the old FORTRAN days. I *am* the original poster. IIRC, a monitor common block is like an mmap'd block. I just wanted a large const array across several simultanious invocations of a program to not take up lots of memory. That's all. > If you want to make a distinction between static and static global, > I still say you need a different section ID for the thing. It's now unclear what you mean by 'static' vs. 'static global'. Thanks for your help, joelh -- Joel Ray Holveck - joelh@gnu.org - http://www.wp.com/piquan Fourth law of programming: Anything that can go wrong wi sendmail: segmentation violation - core dumped