Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!bloom-beacon!oberon!cit-vax!ucla-cs!zen!ucbvax!ucbcad!ames!aurora!labrea!decwrl!pyramid!uccba!hal!ncoast!allbery From: allbery@ncoast.UUCP (Brandon Allbery) Newsgroups: comp.unix.wizards Subject: Re: Big Programs Hurt Performance Message-ID: <4822@ncoast.UUCP> Date: Wed, 7-Oct-87 17:52:35 EDT Article-I.D.: ncoast.4822 Posted: Wed Oct 7 17:52:35 1987 Date-Received: Sun, 11-Oct-87 00:59:17 EDT References: <1665@ncr-sd.SanDiego.NCR.COM) <8579@utzoo.UUCP) <6886@eddie.MIT.EDU) <4754@ncoast.UUCP> <339@oracle.UUCP> Reply-To: allbery@ncoast.UUCP (Brandon Allbery) Followup-To: comp.unix.wizards Organization: Cleveland Public Access UN*X, Cleveland, Oh Lines: 25 As quoted from <339@oracle.UUCP> by jcreight@oracle.UUCP (Jonathan Creighton): +--------------- | > The first program run which uses the shared library allocates a shared memory | > segment at process address 0x300000 and copies /lib/shlib into it. The | > program is linked with a special crt0.o which does the shm attach and load | > (if necessary), and with a loader "ifile" (instruction file, a System V | | Does this mean that each process that is running using shared libraries | consumes one shared memory segment? There is a (rather low) kernel limit | on the number of shared memory segments that may be attatched systemwide, | as I recall. What happens when you run a shared-library program and | there aren't any shared memory segments left? +--------------- Each shared library takes up a shm segment. An attach simply increments the shm_nattch counter and places a pointer to the shm segment in the attacher's page table. (...roughly. It's _always_ more complex...) Is there a limit on the number of attaches permitted? I don't recall one. -- Brandon S. Allbery, moderator of comp.sources.misc {{harvard,mit-eddie}!necntc,well!hoptoad,sun!mandrill!hal}!ncoast!allbery ARPA: necntc!ncoast!allbery@harvard.harvard.edu Fido: 157/502 MCI: BALLBERY <> "...he calls _that_ a `little adventure'?!" - Cmdr. Ryker