Bernd Oppolzer wrote:
I think I found the answer myself.
Using the compiler option ROCONST (which is NOT the default with C
programs),
you can specify that variables with the const attribute not be moved
to the WSA - that
is, the const attribute is respected. Otherwise (NOROCONST) it is
ignored.
This is the default with C (not with C++).
Another way is using #pragma variable (variable_name, norent) for
every such large
read-only table, which has the same effect.
Any further suggestions?
Thank you, have a nice day and weekend.
Bernd
The Dignus C compiler (version 1.95 and later I believe) will do this
for you...
You can move the initialized data to no-rent memory if the initializers
are all constant,
and the data was declared with the "const" keyword (indicating that any
write to it
violates the programmer's intent.)
As Gil mentioned - this is only "really" true for static data... extern
data can't be trusted
because the user might have put the 'const' keyword in one declaration,
and left it off in
another... which would mean that the extern reference might be a RENT
one, while, say,
the definition was non-RENT.
In your situation - where you are declaring a large array of doubles -
putting the data
in non-RENT memory can be a big win.
This is only supported by the assumption that if the programmer says
"const" - he really
means it... that's the point of the ROCONST option in the IBM
compiler. So, you can say
"oh - I guess the programmer didn't _really_ mean it".
- Dave Rivers -
--
riv...@dignus.com Work: (919) 676-0847
Get your mainframe programming tools at http://www.dignus.com
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN