|
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
Kevin
Joined: 01 Mar 2012 Posts: 34 Location: Ascot, UK
|
Posted: Tue Aug 04, 2015 5:22 pm Post subject: Use of VIRTUALCOMMON |
|
|
I have inherited a suite of programs all of which use:
VIRTUALCOMMON 0x30000000
in their link files.
These programs have been distributed to customers for years without problems, until the last 6 months where we have had to change the address to 0x2... to avoid a clash with other programs.
The developer who originally produced the linker files has long since gone, so I wonder if someone could enlighten me as to the need for this linker option and what might be the outcome if it is removed ? (It runs fine without it on our dev. machine).
Many thanks. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Wed Aug 05, 2015 1:42 pm Post subject: |
|
|
Here is an extract from the help file on this subject...
Quote: | It is possible in most languages (and in particular in Fortran and C/C++) to have uninitialised global data, for example, a common block in Fortran not initialised with a BLOCK DATA subprogram. Under normal linking, these are accumulated into the .bss section in the executable (BSS is an old IBM term meaning Block Started by Symbol). Although this section does not contribute to the size of the executable it does contribute to the size of the loaded image. The consequence of this is that the system must have the resources available to meet the size of the .bss section. This is unfortunate, since many applications use very large global arrays, only some of which is ever used.
If the SLINK command vc or virtualcommon is used at some stage during the link process, the ".bss" section is removed from the executable and the global data is allocated to virtual memory at runtime. The result is that pages of memory (4Kb each) are allocated from the system on demand.
|
So the loaded image may be larger when vc is not used. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|