Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!olivea!bbn.com!leafusa!md From: md@HQ.Ileaf.COM (Mark Dionne x5551) Newsgroups: comp.arch Subject: Re: Page size and linkers (was: Re: SunMMU history) Message-ID: <1991Feb4.190949.1190@HQ.Ileaf.COM> Date: 4 Feb 91 19:09:49 GMT References: <45242@mips.mips.COM> <1991Jan27.214522.24408@watdragon.waterloo.edu> <1991Jan29.033024.1516@craycos.com> Reply-To: md@HQ.Ileaf.COM (Mark Dionne x5551) Organization: Interleaf, Inc. Lines: 25 I have done some experiments with Interleaf (a large publishing program written in C), and found that for many usage patterns, typically about 25% of the code that is paged-in is actually touched. This can mean that up to 2 meg of memory is often being "wasted". Simply reordering the .o files helped improve things about 10 to 20%, but structured code tends to put boring initialization routines next to workhorses, etc., preventing one from getting a lot of improvement. One thing that would help out here would be a compiler switch that would produce multiple .o files for a single .c file (one .o file per function). It would then be possible to set up an automated reordering scheme where gprof output would be used to reorder the functions. (Static functions would optionally be either coalesced or treated as global.) An ideal candidate would be gcc. Any volunteers? (I've actually tried this by writing a program to split up compiler assembler output. It worked, but is painful and not portable.) As someone hinted at, X servers would probably be excellent candidates for this treatment. I've heard rumors that Sun has been doing this. -- md@HQ.Ileaf.COM (Internet) Mark Dionne, Interleaf uunet!leafusa!md (uucp) 9 Hillside Ave, Cambridge, MA 02154 (617) 290-4943 x5551