home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!darwin.sura.net!dtix!condor.navsses.navy.mil!system
- From: system@condor.navsses.navy.mil
- Newsgroups: comp.os.vms
- Subject: Re: ballooning EXE size
- Message-ID: <1992Dec29.141701.358@condor.navsses.navy.mil>
- Date: 29 Dec 92 19:17:01 GMT
- References: <01GSUT89O7JK000J0I@XRT.UPENN.EDU>
- Organization: NSWCCD, Naval Ship Systems Eng Sta, Phila PA
- Lines: 50
-
- In article <01GSUT89O7JK000J0I@XRT.UPENN.EDU>, BUHLE@XRT.UPENN.EDU ("E. Loren Buhle, Jr. [-662-3084]", 215) writes:
- > I have a problem with the size of an executable going from ~1,000 blocks to
- > something on the order of 75,000 blocks.
- >
- > What am I doing? I am charged with writing a small interface to some existing
- > FORTRAN code. I have no control over the existing FORTRAN code and can only say
- > that it makes extensive use of VAX-FORTRAN Structure/record/map statements. I
- > don't own the large body of FORTRAN code and really don't relish the thought of
- > rewriting it...
- >
- > When the FORTRAN interface stub subroutines (e.g. subroutines that print a "not
- > implemented" message and return) are replaced with my code, the resulting
- > executable goes from ~1,000blocks to ~75,000 blocks.
- >
- > Yes, I use some scratch arrays (scratch arrays defined as local to the
- > subroutine), so I replaced these with LIB$GET_VM and LIB$FREE_VM and the
- > executable size when back to ~1,100 blocks. I presume the difference is due to
- > my code size. Ok so far, but I can't get away with this for long....
- >
- > Eventually, the addition of the simplest code causes the executable to go from
- > 1,100 blocks to ~76,000 blocks. Looking at the LINK map, the size of my
- > interface modules are quite small. Remember, this is FORTRAN and most of the
- > memory is statically allocated.
- >
- > $link/map/exec=foo.exe
- > untouchable.olb/INC=foo_main, - ! main calling routine
- > untouchable.olb/L, - ! library of untouchable code objects
- > expm.olb/l, - ! my interface routines
- > sys$input/opt
- > SYS$SHARE:FORRTL.EXE/SHARE,sys$library:vaxcrtl.exe/share
- >
- > Thoughts?
- >
- What is the size of your arrays? Do they contain pre-initialized data or are
- they just created as an array of zeros? If the arrays do not contain data you
- should be able to for the linker to create the pages that are used to store the
- arrays as DEMAND ZERO pages. DEMAND ZERO pages are created when the linker
- detects a region (default size: 5 pages or 2.5K bytes) in your program
- that contains un-initialized storage. There are a few cases when a bug causes
- the linker to not compress a large range of uninitialized data to demand zero
- pages. Fortunately you can control the linker's use of demand zero pages with
- a linker options file (see pages 3-7 and 6-19 of the VMS Linker Utility Manual
- V5.0).
- --
- Mike Jacobi
- NAVSSES VAXCluster system manager
- System@Eagle.Navsses.Navy.Mil
- System@Condor.Navsses.Navy.Mil
-
- Disclaimer - I speak for myself. No-one else.
-