Xref: utzoo comp.emacs:6053 comp.unix.questions:13545 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!usc!elroy!david From: david@elroy.Jpl.Nasa.Gov (David Robinson) Newsgroups: comp.emacs,comp.unix.questions Subject: Re: Does GNU emacs ever use shared libraries? Summary: Done Keywords: GNU shared blah blah blah Message-ID: <15867@elroy.Jpl.Nasa.Gov> Date: 12 May 89 20:24:29 GMT References: <152@talarian.UUCP> Followup-To: comp.emacs Distribution: usa Organization: Image Analysis Systems Grp, JPL Lines: 30 In article <152@talarian.UUCP>, scott@talarian.UUCP (Scott Weitzenkamp) writes: > > I noticed that on SunOS 4.0, GNU emacs uses the -Bstatic flag to cc > to prevent the use of shared libraries. Does GNU emacs ever use > shared libraries? If not, why not? Does System V have an option > like -Bstatic to prevent the use of shared libraries? I have implemented a version of GNU emacs that uses shared libraries. The reason it didn't before was that emacs calls unexec() to save the data segment and bss segment, in these segments are information about where libraries are mmap'd in if you compile it with shared libraries. This information is not always the same and will definately differ on different machines. There are other problems as well. My version that uses shared libraries does so by writing out the data and bss segments to a file and mmap'ing it in upon execution. This file is mmap'd in as a copy-on-write segment so that only the pages that are changed will be copied and the rest shared. This should reduce the amount of physical memory needed when more than one copy is running and help out Suns with limited memory. I will be sending the patches to implement this to GNU as soon as I get them upgraded to the latest version of emacs. -- David Robinson elroy!david@csvax.caltech.edu ARPA david@elroy.jpl.nasa.gov ARPA {cit-vax,ames}!elroy!david UUCP Disclaimer: No one listens to me anyway!