home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!ames!agate!ucbvax!XRT.UPENN.EDU!BUHLE
- From: BUHLE@XRT.UPENN.EDU ("E. Loren Buhle, Jr. [-662-3084]", 215)
- Newsgroups: comp.os.vms
- Subject: ballooning EXE size
- Message-ID: <01GSUT89O7JK000J0I@XRT.UPENN.EDU>
- Date: 28 Dec 92 20:24:00 GMT
- Sender: usenet@ucbvax.BERKELEY.EDU
- Organization: The Internet
- Lines: 44
-
- 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.
-
- It would seem that I'm crossing some kind of boundary in terms of virtual
- memory usage and am reserving space in the executable file. This is merely a
- hunch and I'd like to query info-vax for an explanation and any possible
- solutions. Yes, I use all the sharable portions of FORTRAN and C (there is some
- C in my interface, but I observe the same behavior when the C routines are
- "dummied" out) as follows:
-
- $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?
-
- --
- Dr. E. Loren Buhle, Jr. INTERNET: BUHLE@XRT.UPENN.EDU
- University of Pennsylvania School of Medicine Phone: 215-662-3084
- Rm 440A, 3401 Walnut St., Philadelphia, PA 19104-6228 FAX: 215-349-5978
-
-