Shared memory and FORTRAN
Notesfiles owner
notes at hpcmfs.CORP.HP.COM
Sat Feb 10 07:55:28 AEST 1990
/ hpcmfs:comp.unix.wizards / m5 at lynx.uucp (Mike McNally) / 8:44 am Feb 8, 1990 /
>A potential customer of ours is currently using an OS (I don't know
>which one) that provides a nifty (in a gross FORTRAN kind of way)
>inter-process shared memory facility. The FORTRAN code declares
>"global" COMMON blocks, which (I assume) get tagged by the linker such
>that the executable file has magic goomers in it. The magic goomers
>tell the loader that a shared memory segment should be allocated (and
>maybe where it should be, since it would be kinda hard for the loader
>to relocate the whole mess on the fly).
>
>Anyhow, does anybody know of a mechanism (similar to the one above or
>otherwise) that would allow a FOTRAN program easy access to shared
>memory? I don't do FORTRAN on a regular basis, so I'm pretty
>ignorant; maybe the global COMMON mechanism is COMMONplace.
Fortran COMMON is the equivalent of extern in C, import & export
in Pascal (I think that they are the keywords in Pascal).
Speaking for HP's RTE (Real Time Executive) only, shared memory
is allocated a specific block of 'hardware memory'. The allocation -how much
memory to reserve for shared memory and nothing else- is done at system
generation time (something like kernel reconfiguration).
All shared memory segments point to that hardware -absolute- address.
The symbol table is built accordingly.
To use it, all programs must have in their source exactly the same
COMMON statement : the sequence of how variables are declared in that block,
implies its relative location in shared memory.
More information about the Comp.unix.wizards
mailing list